feat(defaults/browsers): add to firefox
This commit is contained in:
parent
307491ce67
commit
ae7430884d
1 changed files with 41 additions and 7 deletions
|
|
@ -16,17 +16,27 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.firefox = lib.mkDefault {
|
programs.firefox = lib.mkDefault {
|
||||||
policies = {
|
policies = {
|
||||||
ExtensionSettings = {
|
ExtensionSettings =
|
||||||
"uBlock0@raymondhill.net" = {
|
let
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
# source: https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265/17
|
||||||
installation_mode = "normal_installed";
|
extension = shortId: uuid: {
|
||||||
};
|
name = uuid;
|
||||||
};
|
value = {
|
||||||
|
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
builtins.listToAttrs [
|
||||||
|
(extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||||
|
(extension "black21" "{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}")
|
||||||
|
];
|
||||||
|
|
||||||
Preferences = {
|
Preferences = {
|
||||||
"browser.newtabpage.activity-stream.feeds.wallpaperfeed".Value = false;
|
"browser.newtabpage.activity-stream.feeds.wallpaperfeed".Value = false;
|
||||||
"browser.newtabpage.activity-stream.feeds.weatherfeed".Value = false;
|
"browser.newtabpage.activity-stream.feeds.weatherfeed".Value = false;
|
||||||
|
|
||||||
# from https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265
|
# source: https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265
|
||||||
"browser.newtabpage.activity-stream.feeds.section.topstories".Value = false;
|
"browser.newtabpage.activity-stream.feeds.section.topstories".Value = false;
|
||||||
"browser.newtabpage.activity-stream.feeds.snippets".Value = false;
|
"browser.newtabpage.activity-stream.feeds.snippets".Value = false;
|
||||||
"browser.newtabpage.activity-stream.section.highlights.includePocket".Value = false;
|
"browser.newtabpage.activity-stream.section.highlights.includePocket".Value = false;
|
||||||
|
|
@ -36,6 +46,30 @@ in
|
||||||
"browser.newtabpage.activity-stream.showSponsored".Value = false;
|
"browser.newtabpage.activity-stream.showSponsored".Value = false;
|
||||||
"browser.newtabpage.activity-stream.system.showSponsored".Value = false;
|
"browser.newtabpage.activity-stream.system.showSponsored".Value = false;
|
||||||
"browser.newtabpage.activity-stream.showSponsoredTopSites".Value = false;
|
"browser.newtabpage.activity-stream.showSponsoredTopSites".Value = false;
|
||||||
|
|
||||||
|
"browser.newtabpage.activity-stream.showSearch".Value = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.topsites".Value = false;
|
||||||
|
"browser.newtabpage.activity-stream.showWeather".Value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
SearchEngines = {
|
||||||
|
Add = [
|
||||||
|
# source: https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265/33
|
||||||
|
{
|
||||||
|
Alias = "@np";
|
||||||
|
IconURL = "https://nixos.org/favicon.png";
|
||||||
|
Method = "GET";
|
||||||
|
Name = "NixOS Packages";
|
||||||
|
URLTemplate = "https://search.nixos.org/packages?from=0&size=200&sort=relevance&type=packages&query={searchTerms}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Alias = "@no";
|
||||||
|
IconURL = "https://nixos.org/favicon.png";
|
||||||
|
Method = "GET";
|
||||||
|
Name = "NixOS Options";
|
||||||
|
URLTemplate = "https://search.nixos.org/options?from=0&size=200&sort=relevance&type=packages&query={searchTerms}";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue