diff --git a/flake.lock b/flake.lock index 7e47b55..40b013a 100644 --- a/flake.lock +++ b/flake.lock @@ -36,12 +36,12 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "dirtyRev": "da8fc11d2e83a7cdba24cfd43ca39bf866d0e56a-dirty", - "dirtyShortRev": "da8fc11-dirty", - "lastModified": 1695737316, - "narHash": "sha256-WAZMw/HqNqaCRCx/DDPWzITDIV8ui9c3PaiTzxYPoTE=", - "type": "git", - "url": "file:///home/patrick/repos/nix/agenix-rekey" + "lastModified": 1696078264, + "narHash": "sha256-NF5G9CHaVWDD6DY0TP8z0cx30dAL1ciFYcVidVvb+NA=", + "owner": "oddlama", + "repo": "agenix-rekey", + "rev": "e529da8197f024c0069c4fde6237505e305b8d0a", + "type": "github" }, "original": { "owner": "oddlama", @@ -154,11 +154,11 @@ ] }, "locked": { - "lastModified": 1695195896, - "narHash": "sha256-pq9q7YsGXnQzJFkR5284TmxrLNFc0wo4NQ/a5E93CQU=", + "lastModified": 1695973661, + "narHash": "sha256-BP2H4c42GThPIhERtTpV1yCtwQHYHEKdRu7pjrmQAwo=", "owner": "numtide", "repo": "devshell", - "rev": "05d40d17bf3459606316e3e9ec683b784ff28f16", + "rev": "cd4e2fda3150dd2f689caeac07b7f47df5197c31", "type": "github" }, "original": { @@ -174,11 +174,11 @@ ] }, "locked": { - "lastModified": 1695632260, - "narHash": "sha256-B8nW57UouYtiWMJKX5leByifMj+lYk7IyV5uz0c/ZwA=", + "lastModified": 1695864092, + "narHash": "sha256-Hu1SkFPqO7ND95AOzBkZE2jGXSYhfZ965C03O72Kbu8=", "owner": "nix-community", "repo": "disko", - "rev": "a14a3fb0a8e465fcd728e398d00204a195be06a3", + "rev": "19b62324663b6b9859caf7f335d232cf4f1f6a32", "type": "github" }, "original": { @@ -471,11 +471,11 @@ ] }, "locked": { - "lastModified": 1695550077, - "narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=", + "lastModified": 1696063111, + "narHash": "sha256-F2IJEbyH3xG0eqyAYn9JoV+niqNz+xb4HICYNkkviNI=", "owner": "nix-community", "repo": "home-manager", - "rev": "a88df2fb101778bfd98a17556b3a2618c6c66091", + "rev": "ae896c810f501bf0c3a2fd7fc2de094dd0addf01", "type": "github" }, "original": { @@ -629,11 +629,11 @@ ] }, "locked": { - "lastModified": 1693791338, - "narHash": "sha256-wHmtB5H8AJTUaeGHw+0hsQ6nU4VyvVrP2P4NeCocRzY=", + "lastModified": 1696058303, + "narHash": "sha256-eNqKWpF5zG0SrgbbtljFOrRgFgRzCc4++TMFADBMLnc=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "8ee78470029e641cddbd8721496da1316b47d3b4", + "rev": "150f38bd1e09e20987feacb1b0d5991357532fb5", "type": "github" }, "original": { @@ -644,11 +644,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1695541019, - "narHash": "sha256-rs++zfk41K9ArWkDAlmBDlGlKO8qeRIRzdjo+9SmNFI=", + "lastModified": 1695887975, + "narHash": "sha256-u3+5FR12dI305jCMb0fJNQx2qwoQ54lv1tPoEWp0hmg=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "61283b30d11f27d5b76439d43f20d0c0c8ff5296", + "rev": "adcfd6aa860d1d129055039696bc457af7d50d0e", "type": "github" }, "original": { @@ -659,11 +659,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1695360818, - "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "lastModified": 1695830400, + "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", "type": "github" }, "original": { @@ -746,11 +746,11 @@ ] }, "locked": { - "lastModified": 1695640374, - "narHash": "sha256-uhux9CgJkqtoS+Mh2KAPTIz2YTGTASqv2IbN/0iSE90=", + "lastModified": 1696040396, + "narHash": "sha256-2EOjJ5bgjCmDso2shw70AiL6wsegbEs8KlMJk2sgHek=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "48c55ade480192dbb65eb7e8850a68b6b64a7927", + "rev": "bedaae13271fd5cfd861698e591d6af7104174e4", "type": "github" }, "original": { @@ -813,11 +813,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1687629384, - "narHash": "sha256-p0m0AXL2s1RhymW7BXfcR6oYfZhYDNmnSiuTQoyP/2o=", + "lastModified": 1695643200, + "narHash": "sha256-49SPrO9fWeIoSXS5pFFFhcC4kyfQik5B2J+GSuMopjE=", "owner": "symphorien", "repo": "nixseparatedebuginfod", - "rev": "08d4f56a656c38eb414aeedecd9f02cb57ffb2a8", + "rev": "318ada174f6e6510a50abb69b7765a28c8009b1a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b914864..17cdc7d 100644 --- a/flake.nix +++ b/flake.nix @@ -127,7 +127,7 @@ import ./lib inputs ++ import ./pkgs ++ [ - nixpkgs-wayland.overlay + # nixpkgs-wayland.overlay devshell.overlays.default agenix-rekey.overlays.default ]; diff --git a/hosts/patricknix/default.nix b/hosts/patricknix/default.nix index 962b44d..82f921f 100644 --- a/hosts/patricknix/default.nix +++ b/hosts/patricknix/default.nix @@ -35,4 +35,5 @@ applications = 9; desktop = 8; }; + hidpi = true; } diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index 713b2d1..b630790 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -2,57 +2,71 @@ inputs, config, pkgs, + lib, ... -}: { +}: let + inherit + (lib) + mkOption + types + ; +in { + options.hidpi = mkOption { + default = false; + type = types.bool; + description = "Enable HighDPI configuration for this host and all installed users"; + }; imports = [ inputs.stylix.nixosModules.stylix ./fonts.nix ./images.nix ]; - stylix = { - autoEnable = false; - polarity = "dark"; - image = config.lib.stylix.pixel "base00"; - base16Scheme = "${pkgs.base16-schemes}/share/themes/vice.yaml"; - # Has to be green - override.base0B = "#00CC99"; - #base16Scheme = { - # base00 = "#101419"; - # base01 = "#171B20"; - # base02 = "#21262e"; - # base03 = "#242931"; - # base04 = "#485263"; - # base05 = "#b6beca"; - # base06 = "#dee1e6"; - # base07 = "#e3e6eb"; - # base08 = "#e05f65"; - # base09 = "#f9a872"; - # base0A = "#f1cf8a"; - # base0B = "#78dba9"; - # base0C = "#74bee9"; - # base0D = "#70a5eb"; - # base0E = "#c68aee"; - # base0F = "#9378de"; - #}; - ## based on decaycs-dark, bright variant - #base16Scheme = { - # base00 = "#101419"; - # base01 = "#171B20"; - # base02 = "#21262e"; - # base03 = "#242931"; - # base04 = "#485263"; - # base05 = "#b6beca"; - # base06 = "#dee1e6"; - # base07 = "#e3e6eb"; - # base08 = "#e5646a"; - # base09 = "#f7b77c"; - # base0A = "#f6d48f"; - # base0B = "#94F7C5"; - # base0C = "#79c3ee"; - # base0D = "#75aaf0"; - # base0E = "#cb8ff3"; - # base0F = "#9d85e1"; - #}; + config = { + stylix = { + autoEnable = false; + polarity = "dark"; + image = config.lib.stylix.pixel "base00"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/vice.yaml"; + # Has to be green + override.base0B = "#00CC99"; + #base16Scheme = { + # base00 = "#101419"; + # base01 = "#171B20"; + # base02 = "#21262e"; + # base03 = "#242931"; + # base04 = "#485263"; + # base05 = "#b6beca"; + # base06 = "#dee1e6"; + # base07 = "#e3e6eb"; + # base08 = "#e05f65"; + # base09 = "#f9a872"; + # base0A = "#f1cf8a"; + # base0B = "#78dba9"; + # base0C = "#74bee9"; + # base0D = "#70a5eb"; + # base0E = "#c68aee"; + # base0F = "#9378de"; + #}; + ## based on decaycs-dark, bright variant + #base16Scheme = { + # base00 = "#101419"; + # base01 = "#171B20"; + # base02 = "#21262e"; + # base03 = "#242931"; + # base04 = "#485263"; + # base05 = "#b6beca"; + # base06 = "#dee1e6"; + # base07 = "#e3e6eb"; + # base08 = "#e5646a"; + # base09 = "#f7b77c"; + # base0A = "#f6d48f"; + # base0B = "#94F7C5"; + # base0C = "#79c3ee"; + # base0D = "#75aaf0"; + # base0E = "#cb8ff3"; + # base0F = "#9d85e1"; + #}; + }; }; } diff --git a/users/common/graphical/sway3.nix b/users/common/graphical/sway3.nix index bbadcc7..15a5834 100644 --- a/users/common/graphical/sway3.nix +++ b/users/common/graphical/sway3.nix @@ -108,33 +108,41 @@ in { programs.i3status-rust = { enable = true; bars.main = { - blocks = [ - { - block = "net"; - } - { - block = "cpu"; - } - { - block = "nvidia_gpu"; - } - { - block = "sound"; - } - { - block = "backlight"; - missing_format = ""; - } - { - block = "time"; - format = "$icon $timestamp.datetime(f:'%a %d.%m.%y %H:%M:%S') "; - interval = 1; - } - ]; + blocks = + [ + { + block = "net"; + } + { + block = "cpu"; + } + { + block = "nvidia_gpu"; + } + ] + ++ {"patricknix" = [{block = "battery";}];}.${nixosConfig.node.name} or [] + ++ [ + { + block = "sound"; + } + { + block = "backlight"; + missing_format = ""; + } + { + block = "time"; + format = "$icon $timestamp.datetime(f:'%a %d.%m.%y %H:%M:%S') "; + interval = 1; + } + ]; theme = "native"; - icons = "material-nf"; - settings."icons.overrides" = { - cpu = ""; + # currently nixpgs-wayland breaks this + # icons = "material-nf"; + settings = { + icons.icons = "material-nf"; + "icons.overrides" = { + cpu = ""; + }; }; }; }; diff --git a/users/common/graphical/themes.nix b/users/common/graphical/themes.nix index 4ac4c79..572d916 100644 --- a/users/common/graphical/themes.nix +++ b/users/common/graphical/themes.nix @@ -2,6 +2,7 @@ pkgs, config, lib, + nixosConfig, ... }: { home.pointerCursor = { @@ -9,7 +10,10 @@ x11.enable = true; package = pkgs.openzone-cursors; name = "OpenZone_White_Slim"; - size = 18; + size = + if nixosConfig.hidpi + then 24 + else 18; }; stylix = { diff --git a/users/common/impermanence.nix b/users/common/impermanence.nix index 6ad1854..896c83f 100644 --- a/users/common/impermanence.nix +++ b/users/common/impermanence.nix @@ -14,11 +14,6 @@ ]; directories = with lib.lists; [".config/dconf"] - ++ - # firefox cannot be a symlink as home manager refuses put files outside your $HOME - optionals config.programs.firefox.enable [ - ".mozilla" - ] ++ optionals config.programs.direnv.enable [ ".local/share/direnv" ] diff --git a/users/common/programs/firefox.nix b/users/common/programs/firefox.nix index ebadda1..3d5b052 100644 --- a/users/common/programs/firefox.nix +++ b/users/common/programs/firefox.nix @@ -1,4 +1,4 @@ -{ +{pkgs, ...}: { home = { sessionVariables = { # Firefox touch support @@ -10,14 +10,14 @@ MOZ_DISABLE_RDD_SANDBOX = 1; }; }; - xdg.mimeApps.defaultApplications = { - "text/html" = ["firefox.desktop"]; - "text/xml" = ["firefox.desktop"]; - "x-scheme-handler/http" = ["firefox.desktop"]; - "x-scheme-handler/https" = ["firefox.desktop"]; - }; - xdg.mimeApps.enable = true; - programs.firefox = { + programs.firefox = let + betterfox = pkgs.fetchFromGitHub { + owner = "yokoffing"; + repo = "Betterfox"; + rev = "116.1"; + hash = "sha256-Ai8Szbrk/4FhGhS4r5gA2DqjALFRfQKo2a/TwWCIA6g="; + }; + in { enable = true; profiles.patrick = { userChrome = '' @@ -33,6 +33,11 @@ height: 32px !important; } ''; + extraConfig = builtins.concatStringsSep "\n" [ + (builtins.readFile "${betterfox}/Securefox.js") + (builtins.readFile "${betterfox}/Fastfox.js") + (builtins.readFile "${betterfox}/Peskyfox.js") + ]; settings = { # user chrome soll funzen "toolkit.legacyUserProfileCustomizations.stylesheets" = true; @@ -44,239 +49,89 @@ # enable if grapics card support av1 "media.av1.enabled" = false; "widget.dmabuf.force-enabled" = true; - # Speeeeed - # Betterfox/ - # PREF: initial paint delay - # How long FF will wait before rendering the page, in milliseconds - # Reduce the 5ms Firefox waits to render the page - # [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1283302 - # [2] https://docs.google.com/document/d/1BvCoZzk2_rNZx3u9ESPoFjSADRI0zIPeJRXFLwWXx_4/edit#heading=h.28ki6m8dg30z - "nglayout.initialpaint.delay" = 0; # default=5; used to be 250 - "nglayout.initialpaint.delay_in_oopif" = 0; # default=5 + # General + "browser.toolbars.bookmarks.visibility" = "never"; # Never show the bookmark toolbar + "intl.accept_languages" = "en-US,en"; + "browser.startup.page" = 3; # always resume session on restart + "privacy.clearOnShutdown.history" = false; # persist history pls + "devtools.chrome.enabled" = true; # enable js in the dev console + "browser.tabs.crashReporting.sendReport" = false; # don't send crash reports + "accessibility.typeaheadfind.enablesound" = false; # No sound in search windows pls + "general.autoScroll" = true; - # PREF: use bigger packets - # Reduce Firefox's CPU usage by requiring fewer application-to-driver data transfers. - # However, it does not affect the actual packet sizes transmitted over the network. - # [1] https://www.mail-archive.com/support-seamonkey@lists.mozilla.org/msg74561.html - "network.buffer.cache.size" = 262144; # 256 kb; default=32768 (32 kb - "network.buffer.cache.count" = 128; # default=24 - - # PREF: increase the absolute number of HTTP connections - # [1] https://kb.mozillazine.org/Network.http.max-connections - # [2] https://kb.mozillazine.org/Network.http.max-persistent-connections-per-server - # [3] https://www.reddit.com/r/firefox/comments/11m2yuh/how_do_i_make_firefox_use_more_of_my_900_megabit/jbfmru6/ - "network.http.max-connections" = 1800; # default=900 - "network.http.max-persistent-connections-per-server" = 10; # default=6; download connections; anything above 10 is excessive - "network.http.max-urgent-start-excessive-connections-per-host" = 5; # default=3 - #"network.http.max-persistent-connections-per-proxy" = 48; // default=32 - "network.websocket.max-connections" = 400; # default=200 - - # PREF: preferred color scheme for websites - # [SETTING] General>Language and Appearance>Website appearance - # By default, color scheme matches the theme of your browser toolbar (3). - # Set this pref to choose Dark on sites that support it (0) or Light (1). - # Before FF95, the pref was 2, which determined site color based on OS theme. - # Dark (0), Light (1), System (2), Browser (3) (default [FF95+]) - # [1] https://www.reddit.com/r/firefox/comments/rfj6yc/how_to_stop_firefoxs_dark_theme_from_overriding/hoe82i5/?context=3 - "layout.css.prefers-color-scheme.content-override" = 0; - - # PREF: disable annoying update restart prompts - # Delay update available prompts for ~1 week. - # Will still show green arrow in menu bar. - "app.update.suppressPrompts" = true; - - # PREF: Mozilla VPN - # [1] https://github.com/yokoffing/Betterfox/issues/169 - "browser.privatebrowsing.vpnpromourl" = ""; - #"browser.vpn_promo.enabled" = false; - - # PREF: disable about:addons' Recommendations pane (uses Google Analytics) - "extensions.getAddons.showPane" = false; # HIDDEN - "extensions.htmlaboutaddons.recommendations.enabled" = false; - - # PREF: disable Extension Recommendations (CFR: "Contextual Feature Recommender") - # [1] https://support.mozilla.org/en-US/kb/extension-recommendations - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; - "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; - - # PREF: hide "More from Mozilla" in Settings - "browser.preferences.moreFromMozilla" = false; - - # PREF: Warnings - "browser.aboutConfig.showWarning" = false; - - # PREF: disable fullscreen delay and notice - "full-screen-api.transition-duration.enter" = "0 0"; - "full-screen-api.transition-duration.leave" = "0 0"; - "full-screen-api.warning.delay" = -1; - "full-screen-api.warning.timeout" = 0; - - # PREF: minimize URL bar suggestions (bookmarks, history, open tabs) - "browser.urlbar.suggest.engines" = false; - - # PREF: enable helpful features: - "browser.urlbar.suggest.calculator" = true; - "browser.urlbar.unitConversion.enabled" = true; - - # PREF: Disable built-in Pocket extension - "extensions.pocket.enabled" = false; - - # PREF: open PDFs inline (FF103+) - "browser.download.open_pdf_attachments_inline" = true; - - # PREF: PDF sidebar on load [HIDDEN] - # 2=table of contents (if not available, will default to 1) - # 1=view pages - # -1=disabled (default) - "pdfjs.sidebarViewOnLoad" = 2; - - "browser.contentblocking.category" = "strict"; - - # PREF: enable Global Privacy Control (GPC) [NIGHTLY] - # Honored by many highly ranked sites [2]. - # [TEST] https://global-privacy-control.glitch.me/ - # [1] https://globalprivacycontrol.org/press-release/20201007.html - # [2] https://github.com/arkenfox/user.js/issues/1542#issuecomment-1279823954 - # [3] https://blog.mozilla.org/netpolicy/2021/10/28/implementing-global-privacy-control/ - # [4] https://help.duckduckgo.com/duckduckgo-help-pages/privacy/gpc/ - # [5] https://brave.com/web-standards-at-brave/4-global-privacy-control/ - # [6] https://www.eff.org/gpc-privacy-badger - # [7] https://www.eff.org/issues/do-not-track - "privacy.globalprivacycontrol.enabled" = true; - "privacy.globalprivacycontrol.functionality.enabled" = true; - - # PREF: enable advanced fingerprinting protection - # [WARNING] Leave disabled unless you're okay with all the drawbacks - # [1] https://librewolf.net/docs/faq/#what-are-the-most-common-downsides-of-rfp-resist-fingerprinting - # [2] https://www.reddit.com/r/firefox/comments/wuqpgi/comment/ile3whx/?context=3 - "privacy.resistFingerprinting" = true; - - # PREF: enable seperate search engine for Private Windows - # [SETTINGS] Preferences>Search>Default Search Engine>"Use this search engine in Private Windows" - "browser.search.separatePrivateDefault.ui.enabled" = true; - - # PREF: disable search and form history - # Be aware that autocomplete form data can be read by third parties [1][2]. - # Form data can easily be stolen by third parties. - # [SETTING] Privacy & Security>History>Custom Settings>Remember search and form history - # [1] https://blog.mindedsecurity.com/2011/10/autocompleteagain.html - # [2] https://bugzilla.mozilla.org/381681 - "browser.formfill.enable" = false; - - # PREF: Enforce Punycode for Internationalized Domain Names to eliminate possible spoofing - # Firefox has some protections, but it is better to be safe than sorry. - # [!] Might be undesirable for non-latin alphabet users since legitimate IDN's are also punycoded. - # [TEST] https://www.xn--80ak6aa92e.com/ (www.apple.com) - # [1] https://wiki.mozilla.org/IDN_Display_Algorithm - # [2] https://en.wikipedia.org/wiki/IDN_homograph_attack - # [3] CVE-2017-5383: https://www.mozilla.org/security/advisories/mfsa2017-02/ - # [4] https://www.xudongz.com/blog/2017/idn-phishing/ - "network.IDN_show_punycode" = true; - - # PREF: enable HTTPS-only Mode - "dom.security.https_only_mode" = true; # Normal + Private Browsing windows - - # PREF: disable password manager - # [NOTE] This does not clear any passwords already saved. - "signon.rememberSignons" = false; # Privacy & Security>Logins and Passwords>Ask to save logins and passwords for websites - - # PREF: disable form autofill - # [NOTE] stored data is not secure (uses a JSON file) - # [1] https://wiki.mozilla.org/Firefox/Features/Form_Autofill - # [2] https://www.ghacks.net/2017/05/24/firefoxs-new-form-autofill-is-awesome - "extensions.formautofill.addresses.enabled" = false; - "extensions.formautofill.creditCards.enabled" = false; - - # PREF: prevent accessibility services from accessing your browser [RESTART] - # Accessibility Service may negatively impact Firefox browsing performance. - # Disable it if you’re not using any type of physical impairment assistive software. - # [1] https://support.mozilla.org/kb/accessibility-services - # [2] https://www.ghacks.net/2021/08/25/firefox-tip-turn-off-accessibility-services-to-improve-performance/ - # [3] https://www.reddit.com/r/firefox/comments/p8g5zd/why_does_disabling_accessibility_services_improve - # [4] https://winaero.com/firefox-has-accessibility-service-memory-leak-you-should-disable-it/ - # [5] https://www.ghacks.net/2022/12/26/firefoxs-accessibility-performance-is-getting-a-huge-boost/ - "accessibility.force_disabled" = 1; - - # PREF: disable Firefox View [FF106+] - # [1] https://support.mozilla.org/en-US/kb/how-set-tab-pickup-firefox-view#w_what-is-firefox-view - "browser.tabs.firefox-view" = false; - - # PREF: default permission for Web Notifications - # To add site exceptions: Page Info>Permissions>Receive Notifications - # To manage site exceptions: Options>Privacy & Security>Permissions>Notifications>Settings - # 0=always ask (default), 1=allow, 2=block - "permissions.default.desktop-notification" = 2; - - # PREF: default permission for Location Requests - # 0=always ask (default), 1=allow, 2=block - "permissions.default.geo" = 2; - - # Disable all the various Mozilla telemetry, studies, reports, etc. - - # PREF: Telemetry - "toolkit.telemetry.unified" = false; - "toolkit.telemetry.enabled" = false; - "toolkit.telemetry.server" = "data:,"; - "toolkit.telemetry.archive.enabled" = false; - "toolkit.telemetry.newProfilePing.enabled" = false; - "toolkit.telemetry.shutdownPingSender.enabled" = false; - "toolkit.telemetry.updatePing.enabled" = false; - "toolkit.telemetry.bhrPing.enabled" = false; - "toolkit.telemetry.firstShutdownPing.enabled" = false; - "toolkit.telemetry.dap_enabled" = false; # DEFAULT [FF108] - - # PREF: Telemetry Coverage - "toolkit.telemetry.coverage.opt-out" = true; - "toolkit.coverage.opt-out" = true; - - # PREF: Health Reports - # [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to send technical data. - "datareporting.healthreport.uploadEnabled" = false; - - # PREF: new data submission, master kill switch - # If disabled, no policy is shown or upload takes place, ever - # [1] https://bugzilla.mozilla.org/1195552 - "datareporting.policy.dataSubmissionEnabled" = false; - - # PREF: Studies - # [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to install and run studies + # Privacy + "privacy.donottrackheader.enabled" = true; + "privacy.trackingprotection.enabled" = true; + "privacy.trackingprotection.socialtracking.enabled" = true; + "privacy.userContext.enabled" = true; + "privacy.userContext.ui.enabled" = true; + # Firefox shall not test option changes on me pls + "app.normandy.enabled" = false; "app.shield.optoutstudies.enabled" = false; - # Personalized Extension Recommendations in about:addons and AMO - # [NOTE] This pref has no effect when Health Reports are disabled. - # [SETTING] Privacy & Security>Firefox Data Collection & Use>Allow Firefox to make personalized extension recommendations - "browser.discovery.enabled" = false; - - # PREF: disable crash reports - "breakpad.reportURL" = ""; - "browser.tabs.crashReporting.sendReport" = false; - # PREF: enforce no submission of backlogged crash reports - "browser.crashReports.unsubmittedCheck.autoSubmit2" = false; - - # PREF: software that continually reports what default browser you are using [WINDOWS] - # [WARNING] Breaks "Make Default..." button in Preferences to set Firefox as the default browser [2]. - # [1] https://techdows.com/2020/04/what-is-firefox-default-browser-agent-and-how-to-disable-it.html - # [2] https://github.com/yokoffing/Betterfox/issues/166 - "default-browser-agent.enabled" = false; - - # PREF: "report extensions for abuse" - "extensions.abuseReport.enabled" = false; - - # PREF: Normandy/Shield [extensions tracking] - # Shield is an telemetry system (including Heartbeat) that can also push and test "recipes" - "app.normandy.enabled" = false; - "app.normandy.api_url" = ""; - - # PREF: PingCentre telemetry (used in several System Add-ons) - # Currently blocked by 'datareporting.healthreport.uploadEnabled' + "beacon.enabled" = false; + "device.sensors.enabled" = false; + "geo.enabled" = false; + # enable ech + "network.dns.echconfig.enabled" = true; + #disable all telemetry + "toolkit.telemetry.archive.enabled" = false; + "toolkit.telemetry.enabled" = false; # enforced by nixos + "toolkit.telemetry.server" = ""; + "toolkit.telemetry.unified" = false; + "extensions.webcompat-reporter.enabled" = false; # don't report compability problems to mozilla + "datareporting.policy.dataSubmissionEnabled" = false; + "datareporting.healthreport.uploadEnabled" = false; "browser.ping-centre.telemetry" = false; + "browser.urlbar.eventTelemetry.enabled" = false; # (default) + # no firefox passwd manager + "browser.contentblocking.report.lockwise.enabled" = false; + "browser.uitour.enabled" = false; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + # no encrypted media extension pls + "media.eme.enabled" = false; + "browser.eme.ui.enabled" = false; + "browser.urlbar.speculativeConnect.enabled" = false; + "dom.battery.enabled" = false; # no battery for you + }; + search = { + force = true; + default = "kagi"; - # PREF: disable Firefox Home (Activity Stream) telemetry - "browser.newtabpage.activity-stream.telemetry" = false; - "browser.newtabpage.activity-stream.feeds.telemetry" = false; + engines = { + "Bing".metaData.hidden = true; + "Amazon.com".metaData.hidden = true; + "Google".metaData.hidden = true; - # privacy is mir auch wichtig + "kagi" = { + iconUpdateURL = "https://kagi.com/favicon.ico"; + updateInterval = 24 * 60 * 60 * 1000; # update every day + urls = [ + { + template = "https://kagi.com/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + }; }; }; }; + home.persistence."/state".directories = [ + ".cache/mozilla" + ".mozilla" + ]; + xdg.mimeApps.enable = true; + xdg.mimeApps.defaultApplications = { + "text/html" = ["firefox.desktop"]; + "text/xml" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; + }; } diff --git a/users/common/programs/thunderbird.nix b/users/common/programs/thunderbird.nix index 365e270..2a5bc76 100644 --- a/users/common/programs/thunderbird.nix +++ b/users/common/programs/thunderbird.nix @@ -1,5 +1,67 @@ {pkgs, ...}: { - home.packages = [pkgs.thunderbird]; + programs.thunderbird = { + enable = true; - home.persistence."/state".directories = [".thunderbird"]; + profiles.personal = { + isDefault = true; + withExternalGnupg = true; + + settings = { + "mail.identity.default.archive_enabled" = true; + "mail.identity.default.archive_keep_folder_structure" = true; + "mail.identity.default.compose_html" = false; + "mail.identity.default.protectSubject" = true; + "mail.identity.default.reply_on_top" = 1; + "mail.identity.default.sig_on_reply" = false; + + "gfx.webrender.all" = true; + "gfx.webrender.enabled" = true; + + "browser.display.use_system_colors" = true; + "browser.theme.dark-toolbar-theme" = true; + }; + }; + + settings = { + # Some general settings. + "mail.server.default.allow_utf8_accept" = true; + "mail.server.default.max_articles" = 1000; + "mail.server.default.check_all_folders_for_new" = true; + "mail.show_headers" = 1; + + # Show some metadata. + "mailnews.headers.showMessageId" = true; + "mailnews.headers.showOrganization" = true; + "mailnews.headers.showReferences" = true; + "mailnews.headers.showUserAgent" = true; + + # Sort mails and news in descending order. + "mailnews.default_sort_order" = 2; + "mailnews.default_news_sort_order" = 2; + # Sort mails and news by date. + "mailnews.default_sort_type" = 18; + "mailnews.default_news_sort_type" = 18; + + # Sort them by the newest reply in thread. + "mailnews.sort_threads_by_root" = true; + # Show time. + "mail.ui.display.dateformat.default" = 1; + # Sanitize it to UTC to prevent leaking local time. + "mail.sanitize_date_header" = true; + + # Email composing QoL. + "mail.identity.default.auto_quote" = true; + "mail.identity.default.attachPgpKey" = true; + + "app.update.auto" = false; + "privacy.donottrackheader.enabled" = true; + }; + }; + + home.persistence."/state".directories = [".cache/thunderbird" ".thunderbird"]; + xdg.mimeApps.enable = true; + xdg.mimeApps.defaultApplications = { + "x-scheme-handler/mailto" = ["thunderbird.desktop"]; + "message/rfc822" = ["thunderbird.desktop"]; + }; }