Enhanced the configuration files to support multi-user management by introducing user options for multiple applications, including art, gaming, multimedia, and development tools. Updated existing modules to utilize these new user options, improving flexibility and maintainability in user package installations.
33 lines
729 B
Nix
33 lines
729 B
Nix
{
|
|
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 = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
|
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";
|
|
};
|
|
}
|