Updated multiple configuration files to include a `merge` option for user management, enhancing the ability to handle multi-user setups for applications and services. This change improves flexibility in managing user-specific package installations, ensuring a more streamlined configuration process.
34 lines
762 B
Nix
34 lines
762 B
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
packages = builtins.attrValues {
|
|
inherit (pkgs)
|
|
hunspell
|
|
;
|
|
inherit (pkgs.hunspellDicts)
|
|
it_IT
|
|
es_MX
|
|
en_CA-large
|
|
;
|
|
};
|
|
in
|
|
{
|
|
options.my.apps.dictionaries = {
|
|
enable = lib.mkEnableOption "dictionaries and language tools";
|
|
users = lib.mkOption {
|
|
type = lib.types.either lib.types.str (lib.types.listOf lib.types.str);
|
|
default = config.my.toggleUsers.apps;
|
|
merge = inputs.self.lib.mergeUsersOption lib;
|
|
description = "Users to install dictionaries packages for";
|
|
};
|
|
};
|
|
config = lib.mkIf config.my.apps.dictionaries.enable {
|
|
users.users = inputs.self.lib.mkUserPackages lib config.my.apps.dictionaries.users packages;
|
|
};
|
|
}
|