os/programs/firefox.nix
2024-10-29 16:44:45 +01:00

85 lines
2.7 KiB
Nix

{config, lib, pkgs, inputs, os, ...} : lib.mkMerge [
(lib.mkIf (os == "linux") {
home.file.".mozilla/firefox/default/chrome/theme".source =
inputs.firefox-gnome-theme;
})
(lib.mkIf (os == "darwin") {
home.file."/Users/stephans/Library/Application Support/Firefox/Profiles/default/chrome/theme".source =
inputs.firefox-macos-theme;
})
{
programs.firefox = lib.mkMerge [
(lib.mkIf (os == "darwin") {
package = null;
})
{
enable = true;
profiles.default = {
isDefault = true;
userChrome = if (os == "linux") then ''
@import "theme/userChrome.css";
'' else ''
@import "theme/chrome/userChrome.css";
@import "theme/custom/singletabhidden.css";
'';
userContent = if (os == "linux") then ''
@import "theme/userContent.css";
'' else ''
@import "theme/chrome/userContent.css";
'';
settings = {
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Enable customChrome.cs
"browser.uidensity" = 0; # Set UI density to normal
"svg.context-properties.content.enabled" = true; # Enable SVG context-propertes
"browser.theme.dark-private-windows" = false; # Disable private window dark theme
"extensions.autoDisableScopes" = 0; # Auto enable new extentions
"browser.toolbars.bookmarks.visibility" = "never";
"gnomeTheme.hideSingleTab" = true;
"signon.rememberSignons" = false;
"dom.private-attribution.submission.enabled" = false;
"app.update.auto" = false;
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
consent-o-matic
sponsorblock
multi-account-containers
] ++ (if (os == "darwin") then [
onepassword-password-manager
] else [
wayback-machine
h264ify
fediact
tampermonkey
]);
search = {
default = "DuckDuckGo";
force = true;
};
containers = {
"Personal" = {
color = "toolbar";
icon = "circle";
id = 0;
};
"ON2IT" = {
color = "toolbar";
icon = "circle";
id = 1;
};
"Lekker van Peet" = {
color = "toolbar";
icon = "circle";
id = 2;
};
};
containersForce = true;
};
}
];
}
]