This commit is contained in:
Peritia 2025-09-10 12:17:16 +02:00
parent fc0abdd4bb
commit aca73cdd0f
73 changed files with 3873 additions and 381 deletions

View file

@ -1,3 +1,20 @@
# Brave Browser (Home Module)
#
# Provides:
# - Brave browser package
# - Optional standard and custom extension sets
#
# Options:
# - enable → Enable Brave browser
# - extensions.enable → Enable Brave extensions
# - extensions.standard→ Enable default extension set of extensions
# - extensions.extra → Extra extension IDs to install
#
# Notes:
# - Default extensions include uBlock Origin, Proton Pass, Proton VPN
# - Extra extensions must be specified by Chrome Web Store ID
#
{ config, lib, pkgs, ... }:
let
@ -5,16 +22,39 @@ let
in
{
options.nyx-module.home.brave = {
enable = lib.mkEnableOption "Enable brave (home) module";
enable = lib.mkEnableOption "Enable Brave (home module)";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.brave;
description = "Package to install for brave.";
extensions = {
enable = lib.mkEnableOption "Enable Brave extensions support";
standard = lib.mkEnableOption "Enable default set of extensions (uBlock, Proton Pass, Proton VPN)";
extra = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
example = [ "abcdefghijklmnop" "qrstuvwxyz123456" ];
description = "List of additional Brave extension IDs to install.";
};
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
programs.brave = {
enable = true;
package = pkgs.brave;
extensions = lib.optionals cfg.extensions.enable (
(lib.optionals cfg.extensions.standard [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin
{ id = "ghmbeldphafepmbegfdlkpapadhbakde"; } # Proton Pass
{ id = "jplgfhpmjnbigmhklmmbgecoobifkmpa"; } # Proton VPN
]) ++
(map (id: { inherit id; }) cfg.extensions.extra)
);
commandLineArgs = [
"--disable-features=AutofillSavePaymentMethods"
"--disable-features=PasswordManagerOnboarding"
"--disable-features=AutofillEnableAccountWalletStorage"
];
};
};
}