Skip to content

Commit

Permalink
Refactor FF config
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Jun 20, 2024
1 parent 4370e4d commit f542a5f
Showing 1 changed file with 95 additions and 61 deletions.
156 changes: 95 additions & 61 deletions home/programs/firefox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ in
programs.firefox = {
inherit (cfg) enable;

profiles."ztbvdcs8.default" = {
inherit (cfg) extensions;
isDefault = true;
containers = {
policies = {
PasswordManagerEnabled = false;
Containers = {
personal = {
color = "turquoise";
icon = "fingerprint";
Expand Down Expand Up @@ -76,64 +75,22 @@ in
name = "Danger Zone";
};
};
search = {
default = "Harke Search";
engines = {
"Harke Search" = {
urls = [{
template = "https://search.harke.ch/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
icon = ./icons/search.harke.ch.svg;
};

"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};

"NixOS Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};

"NixOS Wiki" = {
urls = [{
template = "https://nixos.wiki/index.php";
params = [
{ name = "search"; value = "{searchTerms}"; }
];
}];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};

"Amazon.de".metaData.hidden = true;
"Bing".metaData.hidden = true;
"eBay".metaData.hidden = true;
"Google".metaData.hidden = true;
};
force = true;
DisableFirefoxAccounts = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
settings = {
"browser.search.suggest.enabled" = false;
"browser.search.region" = "CH";
"browser.startup.homepage" = cfg.homepage;
HomePage = cfg.homepage;
HttpsOnlyMode = "force_enabled";
OfferToSaveLogins = false;
Preferences = {
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.pinned" = [
{
title = "Blog";
Expand All @@ -156,10 +113,87 @@ in
url = "https://mail.proton.me";
}
];
"browser.search.suggest.enabled" = false;
"browser.search.region" = "CH";
"cookiebanners.service.mode" = 1;
"cookiebanners.service.mode.privateBrowsing" = 1;
};
};

profiles."ztbvdcs8.default" = {
inherit (cfg) extensions;

isDefault = true;
search =
let
engines = {
harke = "Harke Search";
nixPkgs = "Nix Packages";
nixOpts = "NixOS Options";
nixWiki = "NixOS Wiki";
};
in
{
default = "Harke Search";
engines = {
"${engines.harke}" = {
urls = [{
template = "https://search.harke.ch/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
icon = ./icons/search.harke.ch.svg;
};

"${engines.nixPkgs}" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};

"${engines.nixOpts}" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};

"${engines.nixWiki}" = {
urls = [{
template = "https://nixos.wiki/index.php";
params = [
{ name = "search"; value = "{searchTerms}"; }
];
}];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};

"Amazon.de".metaData.hidden = true;
"Bing".metaData.hidden = true;
"eBay".metaData.hidden = true;
"Google".metaData.hidden = true;
};
force = true;
order = with engines; [
harke
nixPkgs
nixOpts
nixWiki
];
};
};
};
};
}

0 comments on commit f542a5f

Please sign in to comment.