Adjust default shell option
This commit is contained in:
parent
2b7d136b87
commit
84c00f2ffd
|
|
@ -13,8 +13,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
modules.hyprland.enable = true;
|
modules.hyprland.enable = true;
|
||||||
modules.zsh = {
|
|
||||||
enable = false;
|
modules.zsh.enable = true;
|
||||||
defaultShell = true;
|
modules.shell.defaultShell = "zsh";
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
zshCfg = config.modules.zsh;
|
shellCfg = config.modules.shell;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
|
@ -36,10 +36,7 @@ in
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
];
|
];
|
||||||
shell = mkMerge [
|
shell = pkgs.${shellCfg.defaultShell};
|
||||||
(mkIf (zshCfg.enable && zshCfg.defaultShell) pkgs.zsh)
|
|
||||||
(mkIf (!zshCfg.enable || !zshCfg.defaultShell) pkgs.bash)
|
|
||||||
];
|
|
||||||
ignoreShellProgramCheck = true;
|
ignoreShellProgramCheck = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
./shell.nix
|
||||||
./zsh.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