Desktop/firefox: manage firefox with home-manager

This commit is contained in:
Toast 2025-03-25 12:40:29 +01:00
parent 7fce74c605
commit 90b1e43b99

View file

@ -1,58 +1,62 @@
{lib, ...}: {
# System wide firefox settings
programs.firefox = {
enable = true;
policies = {
"DisablePocket" = true;
"DisableTelemetry" = true;
# You need these for Spotify
"EncryptedMediaExtensions" = {"Enabled" = true;};
"ExtensionSettings" = {
# TODO: Install extensions the NUR instead of from AMO
"uBlock0@raymondhill.net" = {
"installation_mode" = "force_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
};
# Decentraleyes
"jid1-BoFifL9Vbdl2zQ@jetpack" = {
"installation_mode" = "normal_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi";
};
"jid1-MnnxcxisBPnSXQ@jetpack" = {
"installation_mode" = "normal_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
};
# Uninstall the kde plasma integration extension if KDE is not installed
"plasma-browser-integration@kde.org"."installation_mode" = lib.mkDefault "blocked";
};
"Preferences" = {
# Enable video hardware acceleration
"media.ffmpeg.vaapi.enabled" = {
"Value" = true;
"Status" = "default";
};
"dom.security.https_only_mode" = {
"Value" = true;
"Status" = "locked";
};
"general.smoothScroll.msdPhysics.enabled" = {
"Value" = true;
"Status" = "default";
home-manager.sharedModules = [
{
# System wide firefox settings
programs.firefox = {
enable = true;
policies = {
DisablePocket = true;
DisableTelemetry = true;
# You need these for Spotify
EncryptedMediaExtensions.Enabled = true;
ExtensionSettings = {
# TODO: Install extensions the NUR instead of from AMO
"uBlock0@raymondhill.net" = {
installation_mode = "force_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
};
# Decentraleyes
"jid1-BoFifL9Vbdl2zQ@jetpack" = {
installation_mode = "normal_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi";
};
"jid1-MnnxcxisBPnSXQ@jetpack" = {
installation_mode = "normal_installed";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
};
# Uninstall the kde plasma integration extension if KDE is not installed
"plasma-browser-integration@kde.org".installation_mode = lib.mkDefault "blocked";
};
Preferences = {
# Enable video hardware acceleration
"media.ffmpeg.vaapi.enabled" = {
Value = true;
Status = "default";
};
"dom.security.https_only_mode" = {
Value = true;
Status = "locked";
};
"general.smoothScroll.msdPhysics.enabled" = {
Value = true;
Status = "default";
};
};
PromptForDownloadLocation = true;
# I use an external password manager, so the built in one just bothers me
PasswordManagerEnabled = false;
Permissions = {
Autoplay = {
Allow = [
"https://www.youtube.com"
"https://sync-tube.de"
];
Default = "block-audio-video";
};
};
FirefoxHome.SponsoredTopSites = false;
};
};
"PromptForDownloadLocation" = true;
# I use an external password manager, so the built in one just bothers me
"PasswordManagerEnabled" = false;
"Permissions" = {
"Autoplay" = {
"Allow" = [
"https://www.youtube.com"
"https://sync-tube.de"
];
"Default" = "block-audio-video";
};
};
"FirefoxHome" = {"SponsoredTopSites" = false;};
};
};
}
];
}