dotfiles/user-modules/browser/firefox/default.nix

78 lines
1.8 KiB
Nix
Raw Normal View History

2024-07-19 12:00:55 +00:00
{
config,
lib,
pkgs,
...
}:
2024-07-18 04:08:27 +00:00
2024-07-19 19:54:41 +00:00
with lib;
2024-07-18 04:08:27 +00:00
let
cfg = config.modules.firefox;
2024-07-19 12:00:55 +00:00
in
{
2024-07-20 04:10:56 +00:00
options.modules.firefox = {
enable = lib.mkEnableOption "firefox";
default = lib.mkEnableOption "default";
};
2024-07-18 04:08:27 +00:00
config = lib.mkIf cfg.enable {
2024-07-20 04:10:56 +00:00
default.browser = mkIf cfg.default "firefox.desktop";
2024-07-18 04:08:27 +00:00
programs.firefox = {
enable = true;
policies = {
AppAutoUpdate = false;
2025-01-24 00:22:01 +00:00
BlockAboutAddons = true;
BlockAboutConfig = true;
BlockAboutProfiles = true;
2024-07-18 04:08:27 +00:00
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableMasterPasswordCreation = true;
DisablePocket = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
DisableSetDesktopBackground = true;
DisableTelemetry = true;
DisplayBookmarksToolbar = "never";
DisplayMenuBar = "never";
2024-07-19 12:00:55 +00:00
DNSOverHTTPS = {
Enabled = false;
};
2024-07-18 04:08:27 +00:00
DontCheckDefaultBrowser = true;
PasswordManagerEnabled = false;
TranslateEnabled = true;
UseSystemPrintDialog = true;
};
2024-07-19 12:00:55 +00:00
2024-07-18 04:08:27 +00:00
profiles.nixos = {
search.default = "DuckDuckGo";
2024-07-19 19:54:41 +00:00
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
];
# Theming
userChrome = readFile (
pkgs.substituteAll {
src = ./userChrome.css;
colors = config.theming.colorsCSS;
}
);
2024-07-18 04:08:27 +00:00
settings = {
"browser.tabs.inTitlebar" = 0;
"extensions.autoDisableScopes" = 0;
2024-07-19 19:54:41 +00:00
"devtools.chrome.enabled" = true;
"devtools.debugger.remote-enabled" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
2024-07-18 04:08:27 +00:00
};
# Force overwriting configuration file
search.force = true;
containersForce = true;
};
};
};
2024-07-19 12:00:55 +00:00
}