Updated multiple configuration files to replace the user option type with a unified `usersOptionType`, enhancing consistency in user management across applications and services. This change simplifies the user configuration process and improves maintainability.
33 lines
682 B
Nix
33 lines
682 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 = inputs.self.lib.usersOptionType lib;
|
|
default = config.my.toggleUsers.apps;
|
|
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;
|
|
};
|
|
}
|