os-config: use brave as default browser

This commit is contained in:
Mateusz Słodkowicz 2024-04-03 11:08:02 +02:00
parent 6b5b53956b
commit aff6076875
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
6 changed files with 34 additions and 4 deletions

View File

@ -169,7 +169,7 @@
dconf.enable = true;
};
materus.profile.browser.enable = true;
@ -279,7 +279,7 @@
binutils
config.materus.profile.packages.firefox
];

View File

@ -17,7 +17,7 @@ in
(lib.mkIf cfg.firefox.enable config.materus.profile.packages.firefox)
(lib.mkIf cfg.vivaldi.enable pkgs.vivaldi)
(lib.mkIf cfg.brave.enable pkgs.brave)
];
] ++ [ (lib.mkIf (osConfig != null && osConfig.materus.profile.browser.enable) osConfig.materus.profile.browser.package)];
}
];

View File

@ -6,6 +6,7 @@
./shell
./games
./desktop
];
}

View File

@ -0,0 +1,24 @@
{ materusArg, config, pkgs, lib, ... }:
let
cfg = config.materus.profile.browser;
in
{
options.materus.profile.browser.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus default browser config";
options.materus.profile.browser.default = lib.mkOption {
type = lib.types.enum [ "firefox" "brave" "vivaldi" ];
example = "vivaldi";
default = "brave";
};
options.materus.profile.browser.package = materusArg.pkgs.lib.mkPrivateVar
(if (cfg.default == "firefox") then config.materus.profile.packages.firefox else
if (cfg.default == "vivaldi") then pkgs.vivaldi else
if (cfg.default == "brave") then pkgs.brave else { });
config = lib.mkIf cfg.enable {
environment.systemPackages = [
config.materus.profile.browser.package
];
};
}

View File

@ -0,0 +1,6 @@
{
imports = [
./browser.nix
];
}

View File

@ -23,7 +23,6 @@ let
steamPkg = pkgs.steam.override {
extraPkgs = pkgs: [
#config.materus.profile.packages.firefox
#optHip #for blender
pkgs.libdecor
pkgs.obs-studio-plugins.obs-vkcapture