Removed the `lib.nix` file and refactored various modules to utilize `inputs.self.lib` for user package and attribute management. This change enhances consistency and maintainability across the configuration files.
24 lines
483 B
Nix
24 lines
483 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)";
|
|
};
|
|
config = {
|
|
users.users = lib.mkMerge (map (user: {
|
|
${user}.shell = pkgs.${config.my.shell.type};
|
|
}) (inputs.self.lib.normalizeUsers config.my.toggleUsers.shell));
|
|
programs.zsh.enable = config.my.shell.type == "zsh";
|
|
};
|
|
}
|