home/programs/browsers: declare firefox addons and start configuring them

This commit is contained in:
Anthony Rodriguez 2024-10-21 19:08:21 +02:00
parent 52532f2ee8
commit 6c0003aa0b
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
4 changed files with 108 additions and 26 deletions

View file

@ -82,6 +82,29 @@
"type": "github" "type": "github"
} }
}, },
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1729491205,
"narHash": "sha256-luvUK8ZTRTdsVao7VqnxvGEvA3rjEmfiwakDyHxQhx8=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "9764579885c84ba5d4bcd9d3061409a527ff805c",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -224,6 +247,21 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1629284811,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": { "inputs": {
"systems": [ "systems": [
"systems" "systems"
@ -243,7 +281,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -261,7 +299,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
@ -279,7 +317,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_5": {
"inputs": { "inputs": {
"systems": "systems_6" "systems": "systems_6"
}, },
@ -421,7 +459,7 @@
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@ -830,25 +868,10 @@
"type": "sourcehut" "type": "sourcehut"
} }
}, },
"nur": {
"locked": {
"lastModified": 1729516261,
"narHash": "sha256-uvW3pAtku4QrCjkThTFwJjLmS5evHPSH6XBGZFHGquA=",
"owner": "nix-community",
"repo": "NUR",
"rev": "282dfd5c7da86c7315c231b95e95d71b36f22347",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nvf": { "nvf": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_5",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"mnw": "mnw", "mnw": "mnw",
"nil": "nil", "nil": "nil",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
@ -2663,14 +2686,14 @@
"ags": "ags", "ags": "ags",
"basix": "basix", "basix": "basix",
"chaotic": "chaotic", "chaotic": "chaotic",
"firefox-addons": "firefox-addons",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"niri": "niri", "niri": "niri",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nur": "nur",
"nvf": "nvf", "nvf": "nvf",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"systems": "systems_5", "systems": "systems_5",
@ -2876,7 +2899,7 @@
}, },
"wezterm": { "wezterm": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_5",
"freetype2": "freetype2", "freetype2": "freetype2",
"harfbuzz": "harfbuzz", "harfbuzz": "harfbuzz",
"libpng": "libpng", "libpng": "libpng",

View file

@ -38,6 +38,11 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -75,8 +80,6 @@
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
nur.url = "github:nix-community/NUR";
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
}; };
} }

View file

@ -1,6 +1,6 @@
{ {
lib,
inputs, inputs,
config,
pkgs, pkgs,
... ...
}: let }: let
@ -13,6 +13,51 @@
in { in {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = {
DisableTelemetry = true;
DisablePocket = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
OfferToSaveLogins = false;
OffertosaveloginsDefault = false;
PasswordManagerEnabled = false;
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
# TODO: declare which block lists are needed
"3rdparty".Extensions = {
"addon@darkreader.org" = {
permissions = ["internal:privateBrowsingAllowed"];
enabled = true;
automation = {
enabled = true;
behavior = "OnOff";
mode = "system";
};
detectDarkTheme = true;
enabledByDefault = true;
changeBrowserTheme = false;
enableForProtectedPages = true;
fetchNews = false;
previewNewDesign = true;
};
"uBlock0@raymondhill.net" = {
permissions = ["internal:privateBrowsingAllowed"];
advancedSettings = [
[
"userResourcesLocation"
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
]
];
adminSettings = {
userSettings = {
uiTheme = "dark";
advancedUserEnabled = true;
userFiltersTrusted = true;
};
};
};
};
};
profiles = { profiles = {
nezia = { nezia = {
settings = { settings = {
@ -21,6 +66,16 @@ in {
"ui.key.menuAccessKeyFocuses" = false; "ui.key.menuAccessKeyFocuses" = false;
}; };
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
darkreader
proton-pass
shinigami-eyes
stylus
ublock-origin
violentmonkey
idontcareaboutcookies
];
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix # https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
search = { search = {
default = "SearxNG"; default = "SearxNG";

View file

@ -19,6 +19,7 @@ in {
home-manager = { home-manager = {
users.nezia.imports = [ users.nezia.imports = [
"${self}/home" "${self}/home"
"${self}/home/programs/games"
"${self}/home/terminal/emulators/foot.nix" "${self}/home/terminal/emulators/foot.nix"
]; ];