diff options
author | tdback <tyler@tdback.net> | 2024-12-21 15:32:13 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2024-12-21 15:32:13 -0500 |
commit | 0a5754541bb01e96021ca7ee74f1256a8ee68bc4 (patch) | |
tree | 2d0b8089e98239963a1e240cff676b1515fc8431 /users/tdback/modules/firefox/default.nix |
initial commit to self-hosted git
Diffstat (limited to 'users/tdback/modules/firefox/default.nix')
-rw-r--r-- | users/tdback/modules/firefox/default.nix | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/users/tdback/modules/firefox/default.nix b/users/tdback/modules/firefox/default.nix new file mode 100644 index 0000000..dde8742 --- /dev/null +++ b/users/tdback/modules/firefox/default.nix @@ -0,0 +1,101 @@ +{ config, pkgs, ... }: +let + lock-false = { + Value = false; + Status = "locked"; + }; + lock-true = { + Value = true; + Status = "locked"; + }; +in +{ + programs.firefox = { + enable = true; + package = pkgs.firefox; + + policies = { + # about:policies + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableFirefoxAccounts = true; + DisableAccounts = true; + DisplayBookmarksToolbar = "newtab"; + DisplayMenuBar = "default-off"; + SearchBar = "unified"; + OfferToSaveLogins = false; + EnableTrackingProtection = { + Value= true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + + # about:config + 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; + }; + + ExtensionSettings = { + # Block all extensions except those defined below. + "*".installation_mode = "blocked"; + + # uBlock Origin + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + + # Bitwarden + "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; + installation_mode = "force_installed"; + }; + + # Dark Reader + "addon@darkreader.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + }; + + profiles.${config.home.username}.search = { + force = true; + default = "searx"; + order = [ "searx" ]; + engines = { + "Amazon.com".metaData.hidden = true; + "Bing".metaData.hidden = true; + "eBay".metaData.hidden = true; + "Google".metaData.hidden = true; + "Wikipedia (en)".metaData.alias = "@w"; + "searx" = { + urls = [{ + template = "http://10.44.4.100:8888/?q={searchTerms}"; + }]; + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@sx" ]; + }; + }; + }; + }; +} |