nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

firefox.nix (1781B)


      1 { config, pkgs, ... }:
      2 
      3 {
      4   programs.firefox = {
      5     enable = true;
      6 
      7     profiles = {
      8       default = {
      9         id = 0;
     10         name = "default";
     11         isDefault = true;
     12 
     13         settings = {
     14           "browser.aboutConfig.showWarning" = false;
     15           "browser.ml.linkPreview.enabled" = false; # long press link previews
     16           "browser.newtab.extensionControlled" = true; # don't warn new tab page has changed
     17           "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false; # recommend extensions while I browse
     18           "browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false; # recommend features while I browse
     19           "browser.startup.couldRestoreSession.count" = "-1"; # restore tabs on startup banner
     20           "browser.startup.homepage" = "https://breadcat.github.io/startpage/";
     21           "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
     22           "extensions.autoDisableScopes" = 0; # enable extensions by default
     23           "general:autoScroll" = true; # middle mouse page scroll instead of paste
     24         };
     25 
     26         extensions = {
     27           packages = with pkgs.nur.repos.rycee.firefox-addons; [
     28             cookie-autodelete
     29             new-tab-override
     30             ublock-origin
     31           ];
     32 
     33         };
     34 
     35       };
     36     };
     37 
     38     policies = {
     39       DisableFirefoxAccounts = true;
     40       DisableFirefoxStudies = true;
     41       DisablePocket = true;
     42       DisableTelemetry = true;
     43     };
     44   };
     45 
     46   home.sessionVariables = {
     47     BROWSER = "firefox";
     48     MOZ_ENABLE_WAYLAND = 1;
     49   };
     50 
     51   xdg.mimeApps.defaultApplications = {
     52     "text/html" = ["firefox.desktop"];
     53     "text/xml" = ["firefox.desktop"];
     54     "x-scheme-handler/http" = ["firefox.desktop"];
     55     "x-scheme-handler/https" = ["firefox.desktop"];
     56   };
     57 
     58 }