NixOS/modules/shell/config.nix
2025-10-01 13:40:05 -06:00

21 lines
366 B
Nix

{
config,
lib,
pkgs,
...
}:
{
options.my.shell.type = lib.mkOption {
type = lib.types.enum [
"bash"
"zsh"
];
default = "bash";
description = "The shell to use system-wide (bash or zsh)";
};
config = {
users.users.jawz.shell = pkgs.${config.my.shell.type};
programs.zsh.enable = config.my.shell.type == "zsh";
};
}