about summary refs log tree commit diff
path: root/modules/firefox/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/firefox/default.nix')
-rw-r--r--modules/firefox/default.nix32
1 files changed, 18 insertions, 14 deletions
diff --git a/modules/firefox/default.nix b/modules/firefox/default.nix
index bad56ff..0d1fe36 100644
--- a/modules/firefox/default.nix
+++ b/modules/firefox/default.nix
@@ -5,14 +5,13 @@
   pkgs,
   ...
 }:
-with lib;
 let
   cfg = config.nixfiles.modules.firefox;
 in
 {
-  options.nixfiles.modules.firefox.enable = mkEnableOption "Firefox";
+  options.nixfiles.modules.firefox.enable = lib.mkEnableOption "Firefox";
 
-  config = mkIf cfg.enable {
+  config = lib.mkIf cfg.enable {
     nixfiles.modules.common.xdg.defaultApplications.firefox = [
       "text/html"
       "x-scheme-handler/http"
@@ -22,7 +21,7 @@ in
     hm = {
       imports = [ inputs.arkenfox.hmModules.arkenfox ];
 
-      home.packages = with pkgs; [ profile-cleaner ];
+      home.packages = [ pkgs.profile-cleaner ];
 
       stylix.targets.firefox = {
         enable = true;
@@ -40,10 +39,10 @@ in
           let
             mkCssWithRoot =
               css:
-              mkMerge [
+              [
                 (
                   let
-                    mapFonts = concatMapStringsSep ", " (font: ''"${font}"'');
+                    mapFonts = lib.concatMapStringsSep ", " (font: ''"${font}"'');
                     size = toString config.stylix.fonts.sizes.applications;
                   in
                   with config.fonts.fontconfig.defaultFonts;
@@ -59,7 +58,8 @@ in
                   ''
                 )
                 (builtins.readFile css)
-              ];
+              ]
+              |> lib.concatLines;
           in
           {
             id = 0;
@@ -76,7 +76,7 @@ in
                 # goes to Robert Helgesson.
                 #
                 # [1]: https://sr.ht/~rycee/mozilla-addons-to-nix/
-                buildFirefoxXpiAddon = makeOverridable (
+                buildFirefoxXpiAddon = lib.makeOverridable (
                   {
                     stdenv ? pkgs.stdenv,
                     fetchurl ? pkgs.fetchurl,
@@ -102,6 +102,7 @@ in
               in
               with addons;
               [
+                bitwarden
                 consent-o-matic
                 furiganaize
                 indie-wiki-buddy
@@ -115,8 +116,8 @@ in
                 user-agent-switcher
                 violentmonkey
               ]
-              ++ optional config.nixfiles.modules.kde.enable plasma-integration
-              ++ optional config.nixfiles.modules.ipfs.enable ipfs-companion;
+              ++ lib.optional config.nixfiles.modules.kde.enable plasma-integration
+              ++ lib.optional config.nixfiles.modules.ipfs.enable ipfs-companion;
 
             search = {
               force = true;
@@ -405,11 +406,11 @@ in
                     name = "XUL";
                     url = "chrome://browser/content/browser.xhtml";
                   }
-                  (mkIf syncthing.enable {
+                  (lib.mkIf syncthing.enable {
                     name = "Syncthing";
                     url = "http://${config.services.syncthing.guiAddress}";
                   })
-                  (mkIf ipfs.enable {
+                  (lib.mkIf ipfs.enable {
                     name = "IPFS";
                     url = "http://127.0.0.1:${toString ipfs.apiPort}/webui";
                   })
@@ -501,8 +502,8 @@ in
               "browser.protections_panel.infoMessage.seen" = true;
               "browser.region.update.region" = "US";
               "browser.search.region" = "US";
-              "browser.search.separatePrivateDefault" = mkForce false;
-              "browser.search.separatePrivateDefault.ui.enabled" = mkForce false;
+              "browser.search.separatePrivateDefault" = lib.mkForce false;
+              "browser.search.separatePrivateDefault.ui.enabled" = lib.mkForce false;
               "browser.search.update" = false;
               "browser.shell.checkDefaultBrowser" = false;
               "browser.tabs.closeWindowWithLastTab" = true;
@@ -516,6 +517,7 @@ in
               "browser.theme.dark-private-windows" = false;
               "browser.toolbars.bookmarks.visibility" = "newtab";
               "browser.translations.enable" = false;
+              "browser.uidensity" = 0;
               "browser.urlbar.decodeURLsOnCopy" = true;
               "browser.urlbar.suggest.addons" = false;
               "browser.urlbar.suggest.bookmark" = true;
@@ -538,7 +540,9 @@ in
               "media.hardwaremediakeys.enabled" = false;
               "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
               "reader.parse-on-load.enabled" = false;
+              "svg.context-properties.content.enabled" = true;
               "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+              "widget.gtk.rounded-bottom-corners.enabled" = true;
             };
           };
       };

Consider giving Nix/NixOS a try! <3