From 325914c9773182e2612bd188201b64c52a8a4e50 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 10 Jan 2025 16:37:03 +0100 Subject: [PATCH 1/2] chore(firefox): improve privacy settings --- .../home-manager/web/firefox/conf/privacy.nix | 4 +- .../web/firefox/conf/tracking.nix | 47 ++++++++++--------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/modules/home-manager/web/firefox/conf/privacy.nix b/modules/home-manager/web/firefox/conf/privacy.nix index bd8a499..3b4d987 100644 --- a/modules/home-manager/web/firefox/conf/privacy.nix +++ b/modules/home-manager/web/firefox/conf/privacy.nix @@ -14,7 +14,7 @@ # Block Cookies # Block 3rd-Party cookies or even all cookies. - "network.cookie.cookieBehavior" = 1; + "network.cookie.cookieBehavior" = 5; # Block Referer # Firefox tells a website, from which site you're coming (the so called RefControl @@ -81,7 +81,7 @@ # href="https://isc.sans.edu/forums/diary/Time+to+disable+WebGL/10867). WebGL is # part of some fingerprinting scripts used in the wild. Some interactive websites # will not work, which are mostly games. - "webgl.disabled" = true; + "webgl.disabled" = false; # Override graphics card vendor and model strings in the WebGL API # Websites can read the graphics card vendor and model using a WebGL API. This diff --git a/modules/home-manager/web/firefox/conf/tracking.nix b/modules/home-manager/web/firefox/conf/tracking.nix index 82817e3..14c26e8 100644 --- a/modules/home-manager/web/firefox/conf/tracking.nix +++ b/modules/home-manager/web/firefox/conf/tracking.nix @@ -5,76 +5,81 @@ # tracked. Most websites ignore this, so you need other privacy options as well. "privacy.donottrackheader.enabled" = true; "privacy.donottrackheader.value" = 1; - + # Enable resistFingerprinting - # The privacy.resistFingerprinting setting coming from the - # tor-browser hides some system properties. See discussion in our bug tracker. - # (https://bugzilla.mozilla.org/show_bug.cgi?id=1308340">Bug #1308340 for more - # information. This option may interfere with other privacy related settings, see - # the Date: Fri, 10 Jan 2025 16:52:20 +0100 Subject: [PATCH 2/2] chore(firefox): add rc file to configure Tridactyl --- modules/home-manager/web/firefox/default.nix | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/home-manager/web/firefox/default.nix b/modules/home-manager/web/firefox/default.nix index 4f35b13..da64118 100644 --- a/modules/home-manager/web/firefox/default.nix +++ b/modules/home-manager/web/firefox/default.nix @@ -64,6 +64,30 @@ in }; }; }; + + xdg.configFile."tridactyl/tridactylrc".text = '' + sanitize tridactyllocal tridactylsync + " Define custom theme + set customthemes.custom #completions table, #tridactyl-input {font-size: .9rem!important;}; + set theme custom + " Smooth scrolling + set smoothscroll true + " Ctrl-F should use the browser's native 'find' functionality. + unbind + " But also support Tridactyl search too. + bind / fillcmdline find + bind ? fillcmdline find -? + bind n findnext 1 + bind N findnext -1 + " K and J should move between tabs. + bind J tabprev + bind K tabnext + " Binds for force reader mode + bind gfr reader + bind gfR reader --tab + set editorcmd foot -T "Edit text from Firefox" nvim %f + ''; + programs.firefox = let allExtensions = cfg.baseExtensions ++ cfg.optionalExtensions; in {