Moved firefox config into ./home/components and included it into ./home/common.nix

This commit is contained in:
xezo360hye 2024-08-05 00:43:16 +03:00
parent 0ae6f0a1a8
commit 9d7e4d18be
4 changed files with 100 additions and 96 deletions

View File

@ -1,5 +1,6 @@
{ {
imports = [ imports = [
./components/nethack.nix ./components/nethack.nix
./components/firefox.nix
]; ];
} }

View File

@ -0,0 +1,97 @@
{ pkgs, ... }:
{
programs.firefox = {
enable = true;
profiles.default = {
containersForce = true;
containers = {
social = {
color = "turquoise";
icon = "fence";
id = 1;
};
shopping = {
color = "orange";
icon = "cart";
id = 2;
};
};
search = {
force = true;
default = "DuckDuckGo";
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@nw" ];
};
"MyNixOS" = {
urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }];
iconUpdateURL = "https://mynixos.com/favicon-light.svg";
definedAliases = [ "@mn" "@mw" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
};
};
policies = {
DisableFirefoxStudies = true;
DisableTelemetry = true;
DisablePocket = true;
DontCheckDefaultBrowser = true;
DownloadDirectory = "\${home}";
EnableTrackingProtection = {
Value = true;
Locked = false;
Cryptomining = true;
EmailTracking = true;
Fingerprinting = true;
Exceptions = [];
};
FirefoxHome = {
SponsoredTopSites = false;
Pocket = false;
SponsoredPocket = false;
};
StartDownloadsInTempDirectory = true;
TranslateEnabled = true;
Preferences = {
"browser.translations.automaticallyPopup" = {
Value = false;
Status = "default";
};
};
};
};
}

View File

@ -1,3 +1,4 @@
{ pkgs, ... }:
{ {
imports = [ imports = [
./components/hyprland.nix ./components/hyprland.nix

View File

@ -1,103 +1,8 @@
{ pkgs, ... }:
{ {
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
firefox = {
enable = true;
profiles.default = {
containersForce = true;
containers = {
social = {
color = "turquoise";
icon = "fence";
id = 1;
};
shopping = {
color = "orange";
icon = "cart";
id = 2;
};
};
search = {
force = true;
default = "DuckDuckGo";
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@nw" ];
};
"MyNixOS" = {
urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }];
iconUpdateURL = "https://mynixos.com/favicon-light.svg";
definedAliases = [ "@mn" "@mw" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
};
};
policies = {
DisableFirefoxStudies = true;
DisableTelemetry = true;
DisablePocket = true;
DontCheckDefaultBrowser = true;
DownloadDirectory = "\${home}";
EnableTrackingProtection = {
Value = true;
Locked = false;
Cryptomining = true;
EmailTracking = true;
Fingerprinting = true;
Exceptions = [];
};
FirefoxHome = {
# TopSites = false;
SponsoredTopSites = false;
Pocket = false;
SponsoredPocket = false;
};
StartDownloadsInTempDirectory = true;
TranslateEnabled = true;
Preferences = {
"browser.translations.automaticallyPopup" = {
Value = false;
Status = "default";
};
};
};
};
bash = { bash = {
enable = true; enable = true;
historyControl = [ "ignoreboth" ]; historyControl = [ "ignoreboth" ];