summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.lock17
-rw-r--r--flake.nix8
-rw-r--r--flake/nixosConfigurations/default.nix1
-rw-r--r--modules/hm/sils/firefox/default.nix9
-rwxr-xr-xmodules/hm/sils/firefox/user-overrides.js23
5 files changed, 58 insertions, 0 deletions
diff --git a/flake.lock b/flake.lock
index 3aba7b9..44e1114 100644
--- a/flake.lock
+++ b/flake.lock
@@ -29,6 +29,22 @@
         "type": "github"
       }
     },
+    "arkenfox-user-js": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1707077370,
+        "narHash": "sha256-624Giuo1TfeXQGzcGK9ETW86esNFhFZ5a46DCjT6K5I=",
+        "owner": "arkenfox",
+        "repo": "user.js",
+        "rev": "33a84b608c8a1f871c6ce9c4d2b932dc57078fae",
+        "type": "github"
+      },
+      "original": {
+        "owner": "arkenfox",
+        "repo": "user.js",
+        "type": "github"
+      }
+    },
     "base16": {
       "inputs": {
         "fromYaml": "fromYaml"
@@ -688,6 +704,7 @@
     "root": {
       "inputs": {
         "agenix": "agenix",
+        "arkenfox-user-js": "arkenfox-user-js",
         "base16-tokyo-night-scheme": "base16-tokyo-night-scheme",
         "crane": "crane",
         "flake-compat": "flake-compat",
diff --git a/flake.nix b/flake.nix
index f070713..b32e09f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -102,6 +102,7 @@
       url = "git+https://git.michaelball.name/gid/base16-tokyo-night-scheme.git";
       flake = false;
     };
+
     systems = {
       url = "git+https://codeberg.org/sils/systems"; #  specify systems to evaluate
     };
@@ -157,6 +158,11 @@
       url = "git+https://git.project-insanity.org/onny/wl-togglescreens.git?ref=main";
       inputs.nixpkgs.follows = "nixpkgs";
     };
+
+    arkenfox-user-js = {
+      url = "github:arkenfox/user.js";
+      flake = false;
+    };
   };
   #}}}
   outputs = {
@@ -175,6 +181,7 @@
     agenix,
     ragenix,
     git-hooks,
+    arkenfox-user-js,
     ...
   } @ attrs:
     flake-utils.lib.eachDefaultSystem (system: let
@@ -239,6 +246,7 @@
           flake-utils
           agenix
           ragenix
+          arkenfox-user-js
           ;
       };
     };
diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix
index 9e7fc33..bfe0e20 100644
--- a/flake/nixosConfigurations/default.nix
+++ b/flake/nixosConfigurations/default.nix
@@ -13,6 +13,7 @@
   flake-utils,
   agenix,
   ragenix,
+  arkenfox-user-js,
 } @ attrs: let
   defaultModules = [
     impermanence.nixosModules.impermanence
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");