Compare commits
No commits in common. "298aa410eb77ec155b7297db0932642a8dd232df" and "2b8335ffb002e72979e5152fb7207391235488a1" have entirely different histories.
298aa410eb
...
2b8335ffb0
|
@ -42,18 +42,18 @@ in
|
||||||
".SynologyDrive/log"
|
".SynologyDrive/log"
|
||||||
".cache/keepassxc"
|
".cache/keepassxc"
|
||||||
".cache/nvim/luac"
|
".cache/nvim/luac"
|
||||||
".cat_installer" # eduroam
|
|
||||||
".config/JetBrains"
|
|
||||||
".config/Nextcloud"
|
".config/Nextcloud"
|
||||||
".config/calibre"
|
|
||||||
".config/github-copilot"
|
|
||||||
".config/kdeconnect"
|
|
||||||
".config/keepassxc"
|
".config/keepassxc"
|
||||||
".local/share/JetBrains"
|
|
||||||
".local/share/direnv"
|
".local/share/direnv"
|
||||||
".local/share/nvim"
|
".local/share/nvim"
|
||||||
".local/share/zoxide"
|
".local/share/zoxide"
|
||||||
|
".local/share/JetBrains"
|
||||||
|
".config/JetBrains"
|
||||||
|
".config/calibre"
|
||||||
".local/state/nvim"
|
".local/state/nvim"
|
||||||
|
".config/kdeconnect"
|
||||||
|
".config/github-copilot"
|
||||||
|
".cat_installer" # eduroam
|
||||||
".mozilla"
|
".mozilla"
|
||||||
"Documents"
|
"Documents"
|
||||||
"Downloads"
|
"Downloads"
|
||||||
|
|
|
@ -29,36 +29,19 @@ in
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
package = mkOption {
|
setSearchEngines = mkEnableOption "firefox search engines";
|
||||||
type = types.package;
|
|
||||||
default = pkgs.firefox;
|
|
||||||
example = pkgs.firefox-esr;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.moritz.programs.firefox = {
|
home-manager.users.moritz.programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
policies =
|
policies = mkIf cfg.setSearchEngines {
|
||||||
let
|
SearchEngines = {
|
||||||
removeExtensions = [ "Google" "Amazon.de" "Bing" "Amazon" "Wikipedia (en)" "Wikipedia (de)" ];
|
|
||||||
convertName = name:
|
|
||||||
let
|
|
||||||
lower = toLower name;
|
|
||||||
escaped = replaceStrings [ "." ] [ "dot" ] lower;
|
|
||||||
sanitized = head (splitString " " escaped);
|
|
||||||
in
|
|
||||||
"${sanitized}@search.mozilla.org";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
SearchEngines = mkIf (hasInfix "esr" cfg.package) {
|
|
||||||
Default = "Kagi";
|
Default = "Kagi";
|
||||||
Remove = removeExtensions;
|
Remove = [ "Google" "Amazon.de" "Bing" ];
|
||||||
};
|
};
|
||||||
ExtensionSettings = genAttrs
|
|
||||||
(map convertName removeExtensions)
|
|
||||||
(_: { installation_mode = "blocked"; });
|
|
||||||
};
|
};
|
||||||
|
package = if cfg.setSearchEngines then pkgs.firefox-esr else pkgs.firefox;
|
||||||
profiles."default" = {
|
profiles."default" = {
|
||||||
extraConfig = mkIf cfg.arkenfox.enable ''
|
extraConfig = mkIf cfg.arkenfox.enable ''
|
||||||
// Arkenfox user.js
|
// Arkenfox user.js
|
||||||
|
|
Loading…
Reference in New Issue