Add assertion that zsh is installed if we set it as our default shell
This commit is contained in:
parent
2710f8988c
commit
8998c1078b
|
|
@ -23,7 +23,7 @@
|
||||||
modules.displayManager.displayManager = "gdm";
|
modules.displayManager.displayManager = "gdm";
|
||||||
|
|
||||||
modules.zsh.enable = true;
|
modules.zsh.enable = true;
|
||||||
modules.shell.defaultShell = "bash";
|
modules.shell.defaultShell = "zsh";
|
||||||
|
|
||||||
modules.pipewire.enable = true;
|
modules.pipewire.enable = true;
|
||||||
}
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.shell;
|
cfg = config.modules.shell;
|
||||||
|
zshCfg = config.modules.zsh;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.shell = {
|
options.modules.shell = {
|
||||||
|
|
@ -20,4 +21,12 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.assertions = []
|
||||||
|
++ (if cfg.defaultShell == "zsh"
|
||||||
|
then [{
|
||||||
|
assertion = zshCfg.enable;
|
||||||
|
message = "You have selected zsh as the default shell, but you haven't enabled it in your configuration.\n\nPlease enable it by adding `modules.zsh.enable = true`.";
|
||||||
|
}]
|
||||||
|
else []);
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue