feat(firefox): set search engines through policies

nixos
Moritz Böhme 2023-12-11 16:55:24 +01:00
parent 82ffbcbde4
commit e7fd307bfb
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 10 additions and 0 deletions

View File

@ -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