From 59180328cda59817d71cd58c8f48ead047375064 Mon Sep 17 00:00:00 2001 From: azahi Date: Mon, 17 Feb 2025 02:21:56 +0300 Subject: 2025-02-17 --- modules/firefox/default.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/firefox/default.nix') diff --git a/modules/firefox/default.nix b/modules/firefox/default.nix index 3507f2d..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; @@ -43,7 +42,7 @@ in [ ( let - mapFonts = concatMapStringsSep ", " (font: ''"${font}"''); + mapFonts = lib.concatMapStringsSep ", " (font: ''"${font}"''); size = toString config.stylix.fonts.sizes.applications; in with config.fonts.fontconfig.defaultFonts; @@ -60,7 +59,7 @@ in ) (builtins.readFile css) ] - |> concatLines; + |> lib.concatLines; in { id = 0; @@ -77,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, @@ -103,6 +102,7 @@ in in with addons; [ + bitwarden consent-o-matic furiganaize indie-wiki-buddy @@ -116,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; @@ -406,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"; }) @@ -502,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; -- cgit 1.4.1