mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-06-17 02:06:32 +05:30
feat(brave): setup brave browser
This commit is contained in:
38
modules/hm/desktop/brave.nix
Normal file
38
modules/hm/desktop/brave.nix
Normal file
@@ -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);
|
||||
};
|
||||
}
|
||||
@@ -70,7 +70,6 @@
|
||||
# --- Packages ---
|
||||
environment.systemPackages = with pkgs; [
|
||||
discord
|
||||
brave
|
||||
zed-editor
|
||||
];
|
||||
|
||||
|
||||
13
modules/nixos/desktop/brave.nix
Normal file
13
modules/nixos/desktop/brave.nix
Normal file
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user