2025-01-18 16:20:44 +08:00
|
|
|
{ lib, pkgs, ... }:
|
2024-08-25 23:02:35 +08:00
|
|
|
{
|
2024-02-14 04:19:48 +08:00
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
2024-06-23 23:20:57 +08:00
|
|
|
package = pkgs.firefox.override {
|
|
|
|
extraPrefsFiles = [
|
2024-08-25 23:02:35 +08:00
|
|
|
(pkgs.runCommandLocal "userjs" { } ''
|
2024-10-20 14:56:19 +08:00
|
|
|
substitute ${pkgs.arkenfox-userjs}/user.js $out \
|
|
|
|
--replace-fail 'user_pref' 'lockPref'
|
|
|
|
'')
|
|
|
|
(pkgs.runCommandLocal "userjs" { } ''
|
|
|
|
substitute ${./user-overrides.js} $out \
|
|
|
|
--replace-fail 'user_pref' 'lockPref'
|
2024-06-23 23:20:57 +08:00
|
|
|
'')
|
|
|
|
];
|
2023-11-12 13:38:43 +08:00
|
|
|
};
|
2024-10-02 19:47:24 +08:00
|
|
|
|
2025-01-18 16:20:44 +08:00
|
|
|
policies.ExtensionSettings =
|
|
|
|
{
|
|
|
|
"*" = {
|
|
|
|
installation_mode = "blocked";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// lib.listToAttrs (
|
|
|
|
map
|
|
|
|
(x: {
|
|
|
|
name = x;
|
|
|
|
value = {
|
|
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${x}/latest.xpi";
|
|
|
|
installation_mode = "force_installed";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
[
|
2025-01-19 00:39:45 +08:00
|
|
|
"redirector@einaregilsson.com" # redirector
|
2025-01-18 16:20:44 +08:00
|
|
|
"sponsorBlocker@ajay.app" # sponsorblock
|
|
|
|
"uBlock0@raymondhill.net" # ublock origin
|
|
|
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}" # bitwarden
|
|
|
|
"{d7742d87-e61d-4b78-b8a1-b469842139fa}" # vimium
|
|
|
|
]
|
|
|
|
);
|
2024-10-02 19:47:24 +08:00
|
|
|
|
2024-08-25 23:02:35 +08:00
|
|
|
profiles."default" = { };
|
2023-11-12 13:38:43 +08:00
|
|
|
};
|
2023-11-05 20:50:08 +08:00
|
|
|
}
|