nix-stuff/roles/desktop/firefox.nix

65 lines
2 KiB
Nix

{ config, pkgs, ... }:
{
# 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";
};
};
"Preferences" = {
# Enable video hardware acceleration
"media.ffmpeg.vaapi.enabled" = {
"Value" = true;
"Status" = "default";
};
"dom.security.https_only_mode" = {
"Value" = true;
"Status" = "locked";
};
# Make firefox use the kde file picker
"widget.use-xdg-desktop-portal.file-picker" = {
"Value" = 1;
"Status" = "default";
};
/*
https://wiki.archlinux.org/title/Firefox#KDE_integration tells me to enable this,
but strangely enough doing so makes firefox ask to be set as the default browser
every time you start it up, so I'll disable it
*/
"widget.use-xdg-desktop-portal.mime-handler" = {
"Value" = 0;
"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" ];
"Default" = "block-audio-video";
};
};
"FirefoxHome" = { "SponsoredTopSites" = false; };
};
};
}