From 8d6af2f9368bf31cf05eac28b2ca09bc095fc000 Mon Sep 17 00:00:00 2001 From: biscuit Date: Wed, 11 Jun 2025 07:19:04 -0500 Subject: [PATCH] fixed the firefox --- modules/desktop/app.nix | 3 -- pkgs/firefox/default.nix | 107 ------------------------------------ system/desktop/browser.nix | 108 ++++++++++++++++++++++++++++++++++++- 3 files changed, 106 insertions(+), 112 deletions(-) delete mode 100644 pkgs/firefox/default.nix diff --git a/modules/desktop/app.nix b/modules/desktop/app.nix index 319c9ef..65f2dbe 100644 --- a/modules/desktop/app.nix +++ b/modules/desktop/app.nix @@ -2,7 +2,4 @@ info = import ../../config.nix; in { home.packages = info.linux-apps.my-apps pkgs; - import = [ - ../../pkgs/firefox/default.nix - ]; } diff --git a/pkgs/firefox/default.nix b/pkgs/firefox/default.nix deleted file mode 100644 index 079c4e8..0000000 --- a/pkgs/firefox/default.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ - config, - pkgs, - ... -}: let - lock-false = { - Value = false; - Status = "locked"; - }; - lock-true = { - Value = true; - Status = "locked"; - }; -in { - programs = { - firefox = { - enable = true; - languagePacks = ["en-US"]; - - /* - ---- POLICIES ---- - */ - # Check about:policies#documentation for options. - policies = { - 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; - DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab" - DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" - SearchBar = "unified"; # alternative: "separate" - - /* - ---- EXTENSIONS ---- - */ - # Check about:support for extension/add-on ID strings. - # Valid strings for installation_mode are "allowed", "blocked", - # "force_installed" and "normal_installed". - ExtensionSettings = { - "*".installation_mode = "blocked"; # blocks all addons except the ones specified below - # uBlock Origin: - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - }; - "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4493940/bitwarden_password_manager-2025.5.0.xpi"; - installation_mode = "force_installed"; - }; - "tridactyl.vim@cmcaine.co.uk" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4405615/tridactyl_vim-1.24.2.xpi"; - installation_mode = "force_installed"; - } - # Privacy Badger: - # "jid1-MnnxcxisBPnSXQ@jetpack" = { - # install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi"; - # installation_mode = "force_installed"; - # }; - # 1Password: - # "{d634138d-c276-4fc8-924b-40a0ea21d284}" = { - # install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi"; - # installation_mode = "force_installed"; - }; - }; - - /* - ---- PREFERENCES ---- - */ - # Check about:config for options. - Preferences = { - "browser.contentblocking.category" = { - Value = "strict"; - Status = "locked"; - }; - "extensions.pocket.enabled" = lock-false; - "extensions.screenshots.disabled" = lock-true; - "browser.topsites.contile.enabled" = lock-false; - "browser.formfill.enable" = lock-false; - "browser.search.suggest.enabled" = lock-false; - "browser.search.suggest.enabled.private" = lock-false; - "browser.urlbar.suggest.searches" = lock-false; - "browser.urlbar.showSearchSuggestionsFirst" = lock-false; - "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false; - "browser.newtabpage.activity-stream.feeds.snippets" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false; - "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false; - "browser.newtabpage.activity-stream.showSponsored" = lock-false; - "browser.newtabpage.activity-stream.system.showSponsored" = lock-false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false; - }; - }; - }; - }; -} diff --git a/system/desktop/browser.nix b/system/desktop/browser.nix index 5b7fb76..4a963df 100644 --- a/system/desktop/browser.nix +++ b/system/desktop/browser.nix @@ -1,3 +1,107 @@ -{ ... }: { - programs.firefox.enable = true; +{ + config, + pkgs, + ... +}: let + lock-false = { + Value = false; + Status = "locked"; + }; + lock-true = { + Value = true; + Status = "locked"; + }; +in { + programs = { + firefox = { + enable = true; + languagePacks = ["en-US"]; + + /* + ---- POLICIES ---- + */ + # Check about:policies#documentation for options. + policies = { + 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; + DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab" + DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" + SearchBar = "unified"; # alternative: "separate" + + /* + ---- EXTENSIONS ---- + */ + # Check about:support for extension/add-on ID strings. + # Valid strings for installation_mode are "allowed", "blocked", + # "force_installed" and "normal_installed". + ExtensionSettings = { + "*".installation_mode = "blocked"; # blocks all addons except the ones specified below + # uBlock Origin: + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4493940/bitwarden_password_manager-2025.5.0.xpi"; + installation_mode = "force_installed"; + }; + "tridactyl.vim@cmcaine.co.uk" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4405615/tridactyl_vim-1.24.2.xpi"; + installation_mode = "force_installed"; + }; + # Privacy Badger: + # "jid1-MnnxcxisBPnSXQ@jetpack" = { + # install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi"; + # installation_mode = "force_installed"; + # }; + # 1Password: + # "{d634138d-c276-4fc8-924b-40a0ea21d284}" = { + # install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi"; + # installation_mode = "force_installed"; + }; + }; + + /* + ---- PREFERENCES ---- + */ + # Check about:config for options. + preferences = { + # "browser.contentblocking.category" = { + # Value = "strict"; + # Status = "locked"; + # }; + "browser.contentblocking.category" = "strict"; + "extensions.pocket.enabled" = false; + "extensions.screenshots.disabled" = true; + "browser.topsites.contile.enabled" = false; + "browser.formfill.enable" = false; + "browser.search.suggest.enabled" = false; + "browser.search.suggest.enabled.private" = false; + "browser.urlbar.suggest.searches" = false; + "browser.urlbar.showSearchSuggestionsFirst" = false; + "browser.newtabpage.activity-stream.feeds.section.topstories" = false; + "browser.newtabpage.activity-stream.feeds.snippets" = false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false; + "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false; + "browser.newtabpage.activity-stream.section.highlights.includeVisited" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.system.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + }; + }; + }; }