about summary refs log tree commit diff
path: root/modules/nixos/firefox/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/nixos/firefox/default.nix165
1 files changed, 72 insertions, 93 deletions
diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix
index 73b5b58..7c69f71 100644
--- a/modules/nixos/firefox/default.nix
+++ b/modules/nixos/firefox/default.nix
@@ -106,18 +106,14 @@ in {
           in
             with addons;
               [
-                bitwarden
-                canvasblocker
                 consent-o-matic
                 darkreader
-                font-fingerprint-defender
                 furiganaize
                 languagetool
-                localcdn
                 no-pdf-download
-                noscript
-                privacy-redirect
+                redirector
                 rikaichamp
+                skip-redirect
                 ublock-origin
                 user-agent-switcher
                 violentmonkey
@@ -225,7 +221,7 @@ in {
               };
 
               "godocs.io" = {
-                urls = [{template = "https://godocs.io/?q={}";}];
+                urls = [{template = "https://godocs.io/?q={searchTerms}";}];
                 icon = ''${pkgs.fetchurl {
                     url = "https://go.dev/images/favicon-gopher.svg";
                     sha256 = "sha256-OlKpUUeYF8TtMoX4e0ERK1ocIb53OJ8ZDxvwJaQVM/0=";
@@ -451,116 +447,103 @@ in {
             };
           };
 
-          # NOTE Kinda breaks explicit bookmarking...
-          # bookmarks = [
-          #   {
-          #     name = "Local";
-          #     bookmarks = with config.nixfiles.modules; [
-          #       (mkIf syncthing.enable {
-          #         name = "Syncthing";
-          #         url = "http://${config.services.syncthing.guiAddress}";
-          #       })
-          #       (mkIf ipfs.enable {
-          #         name = "IPFS";
-          #         url = "http://127.0.0.1:${toString ipfs.apiPort}/webui";
-          #       })
-          #     ];
-          #   }
-          # ];
+          # NOTE This silently overrides all other bookmarks.
+          bookmarks = [
+            {
+              name = "Bookmarks Toolbar";
+              toolbar = true;
+              bookmarks = with config.nixfiles.modules; [
+                (mkIf syncthing.enable {
+                  name = "Syncthing";
+                  url = "http://${config.services.syncthing.guiAddress}";
+                })
+                (mkIf ipfs.enable {
+                  name = "IPFS";
+                  url = "http://127.0.0.1:${toString ipfs.apiPort}/webui";
+                })
+              ];
+            }
+          ];
 
           # https://github.com/arkenfox/user.js/blob/master/user.js
           arkenfox = {
             enable = true;
             "0000".enable = true;
-            "0100".enable = true;
+            "0100" = {
+              enable = true;
+              "0103"."browser.startup.homepage".value = "about:blank";
+            };
             "0200".enable = true;
             "0300".enable = true;
             "0400" = {
               enable = true;
-              "0401" = {
-                enable = true;
-                "browser.safebrowsing.malware.enabled" = {
-                  enable = true;
-                  value = false;
-                };
-                "browser.safebrowsing.phishing.enabled" = {
-                  enable = true;
-                  value = false;
-                };
-              };
-              "0402" = {
-                enable = true;
-                "browser.safebrowsing.downloads.enabled" = {
-                  enable = true;
-                  value = false;
-                };
-              };
+              "0401"."browser.safebrowsing.phishing.enabled".enable = true;
+              "0402"."browser.safebrowsing.downloads.enabled".enable = true;
               "0404" = {
-                enable = true;
-                "browser.safebrowsing.downloads.remote.block_potentially_unwanted" = {
-                  enable = true;
-                  value = false;
-                };
-                "browser.safebrowsing.downloads.remote.block_uncommon" = {
-                  enable = true;
-                  value = false;
-                };
-              };
-              "0405" = {
-                enable = true;
-                "browser.safebrowsing.allowOverride" = {
-                  enable = true;
-                  value = false;
-                };
+                "browser.safebrowsing.downloads.remote.block_potentially_unwanted".enable = true;
+                "browser.safebrowsing.downloads.remote.block_uncommon".enable = true;
               };
+              "0405"."browser.safebrowsing.allowOverride".enable = true;
             };
             "0600".enable = true;
             "0700" = {
               enable = true;
-              "0710" = {
+              "0710"."network.trr.mode" = {
                 enable = true;
-                "network.trr.mode" = {
+                value = 5;
+              };
+            };
+            "0800" = {
+              enable = true;
+              "0830" = {
+                "browser.search.separatePrivateDefault" = {
                   enable = true;
-                  value = 5;
+                  value = false;
+                };
+                "browser.search.separatePrivateDefault.ui.enabled" = {
+                  enable = true;
+                  value = false;
                 };
               };
             };
-            "0800".enable = true;
             "0900".enable = true;
             "1000" = {
               enable = true;
-              "1001" = {
-                enable = true;
-                "browser.cache.disk.enable" = {
-                  enable = true;
-                  value = true;
-                };
-              };
+              "1001".enable = false;
             };
             "1200".enable = true;
             "1600".enable = true;
-            "1700".enable = false;
+            "1700".enable = true;
             "2000".enable = true;
-            "2400".enable = false;
+            "2400".enable = true;
             "2600" = {
               enable = true;
-              "2615" = {
-                enable = true;
-                "permissions.default.shortcuts" = {
-                  enable = true;
-                  value = 2;
-                };
-              };
+              "2615"."permissions.default.shortcuts".enable = true;
             };
             "2700".enable = true;
-            "2800".enable = true;
-            "4500".enable = false;
-            "5000".enable = false;
-            "5500".enable = false;
-            "6000".enable = false;
-            "7000".enable = false;
-            "8000".enable = false;
-            "9000".enable = false;
+            "2800" = {
+              enable = true;
+              "2811"."privacy.clearOnShutdown.history".value = false;
+            };
+            "4500" = {
+              enable = true;
+              "4502".enable = false;
+              "4504".enable = false;
+            };
+            "5000" = {
+              enable = true;
+              "5003".enable = true;
+              "5017".enable = true;
+              "5019".enable = true;
+            };
+            "5500" = {
+              enable = true;
+              "5508".enable = true;
+            };
+            "6000".enable = true;
+            "7000".enable = true;
+            "8000".enable = true;
+            "9000".enable = true;
           };
 
           settings = {
@@ -568,9 +551,6 @@ in {
             "browser.backspace_action" = 0;
             "browser.disableResetPrompt" = true;
             "browser.download.autohideButton" = false;
-            "browser.eme.ui.enabled" = false;
-            "browser.newtabpage.activity-stream.feeds.system.topsites" = false;
-            "browser.newtabpage.activity-stream.feeds.topsites" = false;
             "browser.newtabpage.introShown" = true;
             "browser.onboarding.enabled" = false;
             "browser.open.lastDir" = config.my.home;
@@ -578,6 +558,7 @@ in {
             "browser.region.update.region" = "US";
             "browser.search.region" = "US";
             "browser.search.update" = false;
+            "browser.shell.checkDefaultBrowser" = false;
             "browser.tabs.closeWindowWithLastTab" = true;
             "browser.tabs.firefox-view" = false;
             "browser.tabs.firefox-view-next" = false;
@@ -585,13 +566,13 @@ in {
             "browser.tabs.warnOnClose" = false;
             "browser.tabs.warnOnCloseOtherTabs" = false;
             "browser.tabs.warnOnOpen" = false;
-            "browser.toolbars.bookmarks.visibility" = "never";
+            "browser.toolbars.bookmarks.visibility" = "newtab";
+            "browser.translations.enable" = false;
             "browser.urlbar.decodeURLsOnCopy" = true;
             "browser.warnOnQuitShortcut" = false;
             "devtools.everOpened" = true;
             "doh-rollout.home-region" = "US";
             "extensions.pocket.enabled" = false;
-            "extensions.screenshots.disabled" = true;
             "extensions.update.autoUpdateDefault" = false;
             "extensions.update.enabled" = false;
             "full-screen-api.warning.delay" = 0;
@@ -601,10 +582,8 @@ in {
             "identity.fxaccounts.enabled" = false;
             "media.autoplay.blocking_policy" = 2;
             "media.autoplay.default" = 5;
-            "media.eme.enabled" = false;
             "media.hardwaremediakeys.enabled" = false;
             "reader.parse-on-load.enabled" = false;
-            "signon.rememberSignons" = false;
             "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
           };
         };

Consider giving Nix/NixOS a try! <3