Merge pull request 'firefox' (#2) from firefox into main

Reviewed-on: http://192.168.0.160:3000/Toast/nix-stuff/pulls/2
This commit is contained in:
Toast 2023-06-26 17:51:51 +02:00
commit a061fb29be
3 changed files with 45 additions and 1 deletions

View file

@ -65,7 +65,6 @@
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user. extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [ packages = with pkgs; [
firefox
tree tree
]; ];
}; };

View file

@ -3,5 +3,6 @@
{ {
imports = [ imports = [
./discord.nix ./discord.nix
./firefox.nix
]; ];
} }

44
roles/desktop/firefox.nix Normal file
View file

@ -0,0 +1,44 @@
{ 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";
};
};
"Permissions" = {
"Autoplay" = {
"Allow" = [ "https://www.youtube.com" ];
"Default" = "block-audio-video";
};
};
"FirefoxHome" = { "SponsoredTopSites" = false; };
};
};
}