rest of the split migration

This commit is contained in:
Danilo Reyes
2026-03-16 16:41:10 -06:00
parent 195c55891e
commit 9c6f17f113
44 changed files with 859 additions and 483 deletions

View File

@@ -0,0 +1,32 @@
{
config,
inputs,
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)";
};
users = lib.mkOption {
type = inputs.self.lib.usersOptionType lib;
default = config.my.toggleUsers.shell;
description = "Users to configure shell for";
};
};
config = {
users.users = lib.mkMerge (
map (user: {
${user}.shell = pkgs.${config.my.shell.type};
}) (inputs.self.lib.normalizeUsers config.my.shell.users)
);
programs.zsh.enable = config.my.shell.type == "zsh";
};
}