nix-config/modules/apps/visual/firefox.nix

82 lines
2.7 KiB
Nix

{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.horseman.apps.visual.firefox;
lock-false = {
Value = false;
Status = "locked";
};
in {
options = {
horseman.apps.visual.firefox = {
enable = mkEnableOption "Firefox";
};
};
config = mkIf cfg.enable {
programs.firefox = {
enable = true;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableAccounts = true;
DisableFirefoxScreenshots = true;
DisplayBookmarksToolbar = "never";
PasswordManagerEnabled = false;
ExtensionSettings = {
"*".installation_mode = "blocked";
# uBlock Origin:
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
# Dark Reader
"addon@darkreader.org" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
installation_mode = "force_installed";
};
# Advent of Code delta-rank
"{78b07db2-25ed-4088-9c92-5c5dcfca3c3c}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/advent-of-code-delta-score/latest.xpi";
installation_mode = "force_installed";
};
# SponsorBlock
"sponsorBlocker@ajay.app" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi";
installation_mode = "force_installed";
};
# Bitwarden
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
installation_mode = "force_installed";
};
# Cookie Blocker
"idcac-pub@guus.ninja" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/istilldontcareaboutcookies/latest.xpi";
installation_mode = "force_installed";
};
# Tridactyl
"tridactyl.vim@cmcaine.co.uk" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/tridactyl-vim/latest.xpi";
installation_mode = "force_installed";
};
};
Preferences = {
general = {
autoScroll = true;
};
"browser.newtabpage.activity-stream.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
};
};
};
};
}