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.
31 lines
696 B
Nix
31 lines
696 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
options.my.apps.piano = {
|
|
enable = lib.mkEnableOption "piano learning and music theory apps";
|
|
users = lib.mkOption {
|
|
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
|
default = config.my.toggleUsers.apps;
|
|
description = "Users to install piano packages for";
|
|
};
|
|
};
|
|
config = lib.mkIf config.my.apps.piano.enable {
|
|
users.users =
|
|
let
|
|
packages = builtins.attrValues {
|
|
inherit (pkgs)
|
|
neothesia
|
|
linthesia
|
|
timidity
|
|
;
|
|
};
|
|
in
|
|
inputs.self.lib.mkUserPackages lib config.my.apps.piano.users packages;
|
|
};
|
|
}
|