diff options
author | tilpner | 2020-03-06 16:05:01 +0100 |
---|---|---|
committer | tilpner | 2020-03-06 16:05:01 +0100 |
commit | 5014c0ed2160393fb787b585127bce8f27fda722 (patch) | |
tree | b01c547725982c5ed866683c1b865381736653f8 /default.nix | |
parent | edd25555261c17f74580245b8305cf7edefa4267 (diff) | |
download | firefox-profiles-5014c0ed2160393fb787b585127bce8f27fda722.tar.gz firefox-profiles-5014c0ed2160393fb787b585127bce8f27fda722.tar.xz firefox-profiles-5014c0ed2160393fb787b585127bce8f27fda722.zip |
Separate policy into smaller modules
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..e2b0656 --- /dev/null +++ b/default.nix @@ -0,0 +1,80 @@ +{ pkgs ? import <nixpkgs> {} }: + +with pkgs; + +# Where to find documentation: +# http://kb.mozillazine.org/About:config_entries +# https://www.privacy-handbuch.de/download/moderat/user.js +# https://github.com/mozilla/policy-templates, about:policies#documentation + +let + directory = callPackage nix/directory.nix {}; + ffLib = callPackage nix/lib.nix {}; + search = callPackage nix/search.nix {}; + + callProfile = p: lib.callPackageWith (pkgs // { + inherit ffLib; + }) p {}; +in rec { + profiles = directory.listDirectory callProfile ./profiles; + + disableErrorReporting.preferences = { + breakpad.reportUrl = ""; + }; + + activeProfiles = with profiles; [ + defaults + + addons.disableExtensionSignatureChecking + addons.privacybadger addons.noscript + addons.borderify + + minimalConnections + minimalHome + noAccounts + noClutter + noMedia + noNormandy + noUpdates + noStudies + noPocket + noTunnels + noLocation + noSafebrowsing + restrict + # distrustUser + + forgetActivity + + { policies.RequestedLocales = [ "de-DE" "en-US" ]; } + ]; + + config = ffLib.mergeProfiles activeProfiles; + bundleConfig = { + inherit (config) policies; + preferences = ffLib.flattenAttrs config.preferences; + }; + + bundle = ffLib.bundle bundleConfig; + launcher = ffLib.launcher bundle; + +/* + bundle = profiles.bundle { + policies = { + Preferences = profiles.flattenAttrs { + dom.event.contextmenu.enabled = false; + + extensions = { + blocklist.enabled = false; + getAddons.showPane = false; + htmlaboutaddons.recommendations.enabled = false; + }; + + security.ssl.errorReporting.enabled = false; + }; + + SearchBar = "separate"; + }; + }; + */ +} |