grimm-nix-shared/modules/firefox.nix

49 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2024-03-21 16:03:56 +01:00
{ grimm-shared-inputs, pkgs, config, lib, ... }: let
cfg = config.grimmShared;
in {
config = with cfg; lib.mkIf (enable && firefox.enable) {
2024-03-17 11:36:16 +01:00
environment.systemPackages = []
++ lib.optionals config.services.desktopManager.plasma6.enable [ pkgs.plasma-browser-integration ];
programs.firefox = {
2024-03-21 16:03:56 +01:00
# package = grimm-shared-inputs.ff_nightly.packages.${pkgs.system}.firefox-nightly-bin;
enable = true;
nativeMessagingHosts.packages = []
++ lib.optionals (cfg.tooling.enable && cfg.tooling.pass) [ pkgs.passff-host ];
languagePacks = [ "de" "en-US" ];
policies = {
ExtensionSettings = lib.mkMerge [
(lib.mkIf cfg.firefox.disableUserPlugins {
"*".installation_mode = "blocked";
} )
(lib.mapAttrs (guid: shortId: { # explicit plugins by config
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
installation_mode = "force_installed";
} ) cfg.firefox.plugins )
(lib.mkIf (cfg.tooling.enable && cfg.tooling.pass) { # password-store support
"passff@invicem.pro" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/passff/latest.xpi";
installation_mode = "force_installed";
};
})
];
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DisableFirefoxScreenshots = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
};
};
};
}