nixos/modules/desktop/browsers/firefox/default.nix

88 lines
2.5 KiB
Nix
Raw Normal View History

{ options, config, lib, pkgs, ... }:
let cfg = config.modules.desktop.browsers.firefox;
2023-08-11 02:01:03 +04:00
in {
2023-07-09 02:06:28 +04:00
options.modules.desktop.browsers.firefox = {
2024-08-01 16:24:09 +04:00
enable = lib.mkEnableOption false;
};
2023-07-31 18:28:20 +04:00
# TODO add this
# https://github.com/Dook97/firefox-qutebrowser-userchrome
2023-08-11 02:01:03 +04:00
2024-08-01 16:24:09 +04:00
config = lib.mkIf cfg.enable {
2023-07-31 18:14:58 +04:00
programs.firefox = {
enable = true;
preferences = {
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.compactmode.show" = true;
2023-07-31 18:14:58 +04:00
};
};
2024-07-05 00:06:28 +04:00
2024-09-12 16:01:53 +04:00
home-manager.users.sako = {
programs.firefox = {
enable = true;
profiles = {
"user" = {
id = 0;
isDefault = true;
2024-09-14 14:50:30 +04:00
# userChrome = ''
# '';
2024-09-12 16:01:53 +04:00
search.default = "DuckDuckGo";
2024-09-12 16:28:16 +04:00
search.force = true;
2024-09-12 16:01:53 +04:00
search.engines = {
"Nix Packages" = {
urls = [{
template =
"https://search.nixos.org/packages?channel=unstable";
params = [{
name = "query";
value = "{searchTerms}";
}];
}];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nixpkgs" ];
2024-09-12 16:01:53 +04:00
};
"Nix Options" = {
definedAliases = [ "@nixopts" ];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
urls = [{
template =
"https://search.nixos.org/options?channel=unstable";
params = [{
name = "query";
value = "{searchTerms}";
}];
}];
};
"Home Manager Options" = {
definedAliases = [ "@homemgropts" ];
icon =
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
urls = [{
template =
"https://home-manager-options.extranix.com/?release=master";
params = [{
name = "query";
value = "{searchTerms}";
}];
}];
2024-09-12 16:01:53 +04:00
};
};
};
};
};
2024-09-14 20:05:43 +04:00
programs.browserpass = {
enable = true;
browsers = [ "firefox" ];
};
2024-09-12 16:01:53 +04:00
};
programs.browserpass.enable = true;
};
}