diff --git a/modules/hm/desktop/brave.nix b/modules/hm/desktop/brave.nix new file mode 100644 index 0000000..9f68ad3 --- /dev/null +++ b/modules/hm/desktop/brave.nix @@ -0,0 +1,38 @@ +{ + flake.modules.homeManager.desktop = + { + pkgs, + config, + ... + }: + let + configDir = "${config.xdg.configHome}/BraveSoftware/Brave-Browser"; + + extensionJson = ext: { + name = "${configDir}/External Extensions/${ext.id}.json"; + value.text = builtins.toJSON { + external_update_url = "https://clients2.google.com/service/update2/crx"; + }; + }; + + extensions = [ + { id = "nkbihfbeogaeaoehlefnkodbefgpgknn"; } # Metamask + { id = "gppongmhjkpfnbhagpmjfkannfbllamg"; } # Wappalyzer + { id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden + { id = "bfnaelmomeimhlpmgjnjophhpkkoljpa"; } # Phantom + { id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } # DarkReader + ]; + in + { + programs.chromium = { + enable = true; + package = pkgs.brave; + commandLineArgs = [ + "--disable-features=WebRtcAllowInputVolumeAdjustment" + "--force-device-scale-factor=1.0" + ]; + }; + + home.file = builtins.listToAttrs (map extensionJson extensions); + }; +} diff --git a/modules/hosts/sirius/config.nix b/modules/hosts/sirius/config.nix index dc93b6f..c0b5bd5 100644 --- a/modules/hosts/sirius/config.nix +++ b/modules/hosts/sirius/config.nix @@ -70,7 +70,6 @@ # --- Packages --- environment.systemPackages = with pkgs; [ discord - brave zed-editor ]; diff --git a/modules/nixos/desktop/brave.nix b/modules/nixos/desktop/brave.nix new file mode 100644 index 0000000..2baa7bd --- /dev/null +++ b/modules/nixos/desktop/brave.nix @@ -0,0 +1,13 @@ +{ + flake.modules.nixos.desktop = { + environment.etc."/brave/policies/managed/brave-policies.json".text = builtins.toJSON { + TorDisabled = true; + BraveAIChatEnabled = false; + BraveRewardsDisabled = true; + BraveWalletDisabled = true; + BraveVPNDisabled = true; + BraveNewsDisabled = true; + BraveTalkDisabled = true; + }; + }; +}