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.
34 lines
899 B
Nix
34 lines
899 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
options.my.apps.multimedia = {
|
|
enable = lib.mkEnableOption "multimedia applications and media players";
|
|
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 multimedia packages for";
|
|
};
|
|
};
|
|
config = lib.mkIf config.my.apps.multimedia.enable {
|
|
users.users =
|
|
let
|
|
packages = builtins.attrValues {
|
|
inherit (pkgs)
|
|
curtail # image compressor
|
|
easyeffects # equalizer
|
|
identity # compare images or videos
|
|
mousai # poor man shazam
|
|
shortwave # listen to world radio
|
|
tagger # tag music files
|
|
;
|
|
};
|
|
in
|
|
inputs.self.lib.mkUserPackages lib config.my.apps.multimedia.users packages;
|
|
};
|
|
}
|