summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-04-10 18:30:24 +0200
committerSilas Schöffel <sils@sils.li>2024-04-10 18:31:41 +0200
commit75c35935441753e7e45bac4983917d8c85d7ec60 (patch)
tree25026479a3c16a263709c1f6e4fd431115ac5d55 /modules
parentfirefox: add banking container (diff)
downloadnix-config-75c35935441753e7e45bac4983917d8c85d7ec60.tar.gz
nix-config-75c35935441753e7e45bac4983917d8c85d7ec60.zip
firefox: add user-js
Diffstat (limited to '')
-rw-r--r--modules/hm/sils/firefox/default.nix9
-rwxr-xr-xmodules/hm/sils/firefox/user-overrides.js23
2 files changed, 32 insertions, 0 deletions
diff --git a/modules/hm/sils/firefox/default.nix b/modules/hm/sils/firefox/default.nix
index 6f582c2..26939e1 100644
--- a/modules/hm/sils/firefox/default.nix
+++ b/modules/hm/sils/firefox/default.nix
@@ -1,9 +1,17 @@
 {
   config,
   lib,
+  pkgs,
+  arkenfox-user-js,
   ...
 }: let
   cfg = config.sils.home.firefox;
+  user-overrides-js = pkgs.writeText "user_override.js" (builtins.readFile ./user-overrides.js);
+  user-js = pkgs.runCommand "user.js" {} ''
+    mkdir $out;
+    cat "${arkenfox-user-js}/user.js" > $out/user.js;
+    cat "${user-overrides-js}" >> $out/user.js;
+  '';
 in {
   options.sils.home.firefox = {
     enable = lib.mkEnableOption "opinionated firefox configuration";
@@ -20,6 +28,7 @@ in {
               id = 0;
             };
           };
+          extraConfig = builtins.readFile "${user-js}/user.js";
           id = 0;
           isDefault = true;
           name = "default";
diff --git a/modules/hm/sils/firefox/user-overrides.js b/modules/hm/sils/firefox/user-overrides.js
new file mode 100755
index 0000000..f5ff8d6
--- /dev/null
+++ b/modules/hm/sils/firefox/user-overrides.js
@@ -0,0 +1,23 @@
+//custom things for the user.js
+user_pref("_user.js.parrot", "overrides section syntax error");
+//Fingerprinting resistance doesn't make sense in any browser other than Tor.
+//user_pref("privacy.window.maxInnerWidth", 1000);
+//user_pref("privacy.window.maxInnerHeight", 1900);
+user_pref("privacy.resistFingerprinting", true);
+user_pref("privacy.resistFingerprinting.letterboxing", false);
+
+/* override recipe: enable session restore ***/
+//user_pref("browser.startup.page", 3); // 0102
+  // user_pref("browser.privatebrowsing.autostart", false); // 0110 required if you had it set as true
+user_pref("places.history.enabled", true); // 0862 required if you had it set as false
+user_pref("browser.sessionstore.privacy_level", 0); // 1021 optional [to restore extras like cookies/formdata]
+user_pref("privacy.clearOnShutdown.history", false); // 2803
+user_pref("privacy.clearOnShutdown.cookies", false); // 2803 optional
+user_pref("privacy.clearOnShutdown.formdata", false); // 2803 optional
+user_pref("privacy.cpd.history", false); // 2804 to match when you use Ctrl-Shift-Del
+  // user_pref("privacy.cpd.cookies", false); // 2804 optional
+  // user_pref("privacy.cpd.formdata", false); // 2804 optional
+user_pref("network.cookie.lifetimePolicy", 0);
+// I want to use Google Earth sometimes.
+user_pref("webgl.disabled", false);
+user_pref("_user.js.parrot", "overrides section successful");