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.
30 lines
728 B
Nix
30 lines
728 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
options.my.shell.exercism = {
|
|
enable = lib.mkEnableOption "Exercism coding practice platform";
|
|
users = lib.mkOption {
|
|
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
|
default = config.my.toggleUsers.shell;
|
|
description = "Users to install Exercism for";
|
|
};
|
|
};
|
|
config = lib.mkIf config.my.shell.exercism.enable {
|
|
users.users =
|
|
let
|
|
packages = builtins.attrValues {
|
|
inherit (pkgs)
|
|
exercism # learn to code
|
|
bats # testing system, required by Exercism
|
|
;
|
|
};
|
|
in
|
|
inputs.self.lib.mkUserPackages lib config.my.shell.exercism.users packages;
|
|
};
|
|
}
|