multi-user toggle init

This commit is contained in:
Danilo Reyes
2026-01-16 10:19:36 -06:00
parent 597f9ee5b8
commit 4e835aca1b
31 changed files with 304 additions and 119 deletions

View File

@@ -14,7 +14,11 @@
description = "The shell to use system-wide (bash or zsh)";
};
config = {
users.users.jawz.shell = pkgs.${config.my.shell.type};
users.users = let
users = if lib.isString config.my.toggleUsers.shell then [ config.my.toggleUsers.shell ] else config.my.toggleUsers.shell;
in lib.mkMerge (map (user: {
${user}.shell = pkgs.${config.my.shell.type};
}) users);
programs.zsh.enable = config.my.shell.type == "zsh";
};
}