From e7fd307bfb289fbd7f489c9945c6b840c9cc5e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 11 Dec 2023 16:55:24 +0100 Subject: [PATCH] feat(firefox): set search engines through policies --- modules/programs/firefox.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index bc97d53..ffdd778 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -29,11 +29,21 @@ in ); }; }; + setSearchEngines = mkEnableOption "firefox search engines" // { + default = true; + }; }; config = mkIf cfg.enable { home-manager.users.moritz.programs.firefox = { enable = true; + policies = mkIf cfg.setSearchEngines { + SearchEngines = { + Default = "Kagi"; + Remove = [ "Google" "Amazon.de" "Bing" ]; + }; + }; + package = if cfg.setSearchEngines then pkgs.firefox-esr else pkgs.firefox; profiles."default" = { extraConfig = mkIf cfg.arkenfox.enable '' // Arkenfox user.js