split web-browser out of toplevel home-manager.nix file

This commit is contained in:
colin 2022-07-06 14:41:19 -07:00
parent 8fd42f49c2
commit 1dd3cab02b
2 changed files with 88 additions and 84 deletions

View File

@ -148,91 +148,8 @@ in
};
firefox = lib.mkIf (sysconfig.colinsane.gui.enable) {
# common settings to toggle (at runtime, in about:config):
# > security.ssl.require_safe_negotiation
enable = true;
# librewolf is a forked firefox which patches firefox to allow more things
# (like default search engines) to be configurable at runtime.
# many of the settings below won't have effect without those patches.
# see: https://gitlab.com/librewolf-community/settings/-/blob/master/distribution/policies.json
package = pkgs.wrapFirefox pkgs.librewolf-unwrapped {
# inherit the default librewolf.cfg
# it can be further customized via ~/.librewolf/librewolf.overrides.cfg
inherit (pkgs.librewolf-unwrapped) extraPrefsFiles;
libName = "librewolf";
extraPolicies = {
NoDefaultBookmarks = true;
SearchEngines = {
Default = "DuckDuckGo";
};
AppUpdateURL = "https://localhost";
DisableAppUpdate = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DisableSystemAddonUpdate = true;
DisableFirefoxStudies = true;
DisableTelemetry = true;
DisableFeedbackCommands = true;
DisablePocket = true;
DisableSetDesktopBackground = false;
Extensions = {
Install = [
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/bypass-paywalls-clean/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/ether-metamask/latest.xpi"
];
# remove many default search providers
Uninstall = [
"google@search.mozilla.org"
"bing@search.mozilla.org"
"amazondotcom@search.mozilla.org"
"ebay@search.mozilla.org"
"twitter@search.mozilla.org"
];
};
# XXX doesn't seem to have any effect...
# docs: https://github.com/mozilla/policy-templates#homepage
# Homepage = {
# HomepageURL = "https://uninsane.org/";
# StartPage = "homepage";
# };
# NewTabPage = true;
# docs: https://chromeenterprise.google/policies/?policy=ManagedBookmarks
# docs: https://github.com/mozilla/policy-templates#managedbookmarks
ManagedBookmarks = [
{
toplevel_name = "bookmarks";
}
{
name = "Pleroma";
url = "https://fed.uninsane.org/";
}
{
name = "Home Manager Config";
url = "https://nix-community.github.io/home-manager/options.html";
}
{
name = "Delightful Apps";
url = "https://delightful.club/";
}
{
name = "Linux Phone Apps";
url = "https://linuxphoneapps.org/mobile-compatibility/5/";
}
{
name = "Crowdsupply";
url = "https://www.crowdsupply.com/";
}
{
name = "Mempool";
url = "https://jochen-hoenicke.de/queue";
}
];
};
};
package = import ./web-browser.nix pkgs;
};
# "command not found" will cause the command to be searched in nixpkgs

87
modules/universal/env/web-browser.nix vendored Normal file
View File

@ -0,0 +1,87 @@
pkgs:
# common settings to toggle (at runtime, in about:config):
# > security.ssl.require_safe_negotiation
# librewolf is a forked firefox which patches firefox to allow more things
# (like default search engines) to be configurable at runtime.
# many of the settings below won't have effect without those patches.
# see: https://gitlab.com/librewolf-community/settings/-/blob/master/distribution/policies.json
pkgs.wrapFirefox pkgs.librewolf-unwrapped {
# inherit the default librewolf.cfg
# it can be further customized via ~/.librewolf/librewolf.overrides.cfg
inherit (pkgs.librewolf-unwrapped) extraPrefsFiles;
libName = "librewolf";
extraPolicies = {
NoDefaultBookmarks = true;
SearchEngines = {
Default = "DuckDuckGo";
};
AppUpdateURL = "https://localhost";
DisableAppUpdate = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DisableSystemAddonUpdate = true;
DisableFirefoxStudies = true;
DisableTelemetry = true;
DisableFeedbackCommands = true;
DisablePocket = true;
DisableSetDesktopBackground = false;
Extensions = {
Install = [
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/bypass-paywalls-clean/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/ether-metamask/latest.xpi"
];
# remove many default search providers
Uninstall = [
"google@search.mozilla.org"
"bing@search.mozilla.org"
"amazondotcom@search.mozilla.org"
"ebay@search.mozilla.org"
"twitter@search.mozilla.org"
];
};
# XXX doesn't seem to have any effect...
# docs: https://github.com/mozilla/policy-templates#homepage
# Homepage = {
# HomepageURL = "https://uninsane.org/";
# StartPage = "homepage";
# };
# NewTabPage = true;
# docs: https://chromeenterprise.google/policies/?policy=ManagedBookmarks
# docs: https://github.com/mozilla/policy-templates#managedbookmarks
ManagedBookmarks = [
{
toplevel_name = "bookmarks";
}
{
name = "Pleroma";
url = "https://fed.uninsane.org/";
}
{
name = "Home Manager Config";
url = "https://nix-community.github.io/home-manager/options.html";
}
{
name = "Delightful Apps";
url = "https://delightful.club/";
}
{
name = "Linux Phone Apps";
url = "https://linuxphoneapps.org/mobile-compatibility/5/";
}
{
name = "Crowdsupply";
url = "https://www.crowdsupply.com/";
}
{
name = "Mempool";
url = "https://jochen-hoenicke.de/queue";
}
];
};
}