Adjust default shell option
This commit is contained in:
parent
4d3330d4f3
commit
f46f67dd71
|
|
@ -13,8 +13,7 @@
|
|||
];
|
||||
|
||||
modules.hyprland.enable = true;
|
||||
modules.zsh = {
|
||||
enable = false;
|
||||
defaultShell = true;
|
||||
};
|
||||
|
||||
modules.zsh.enable = true;
|
||||
modules.shell.defaultShell = "zsh";
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
}:
|
||||
with lib;
|
||||
let
|
||||
zshCfg = config.modules.zsh;
|
||||
shellCfg = config.modules.shell;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
|
@ -37,10 +37,7 @@ in
|
|||
extraGroups = [
|
||||
"wheel"
|
||||
];
|
||||
shell = mkMerge [
|
||||
(mkIf (zshCfg.enable && zshCfg.defaultShell) pkgs.zsh)
|
||||
(mkIf (!zshCfg.enable || !zshCfg.defaultShell) pkgs.bash)
|
||||
];
|
||||
shell = pkgs.${shellCfg.defaultShell};
|
||||
ignoreShellProgramCheck = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./shell.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.shell;
|
||||
in
|
||||
{
|
||||
options.modules.shell = {
|
||||
defaultShell = mkOption {
|
||||
type = types.enum [
|
||||
"bash"
|
||||
"zsh"
|
||||
];
|
||||
default = "zsh";
|
||||
description = ''
|
||||
The default shell to use for your user account.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue