Introduced a new file `lib.nix` containing helper functions to streamline user package management and attributes for multi-user configurations. Updated various modules to utilize these functions, enhancing code maintainability and readability.
26 lines
494 B
Nix
26 lines
494 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
userLib = import ../lib.nix { inherit lib; };
|
|
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";
|
|
config = lib.mkIf config.my.apps.dictionaries.enable {
|
|
users.users = userLib.mkUserPackages config.my.toggleUsers.apps packages;
|
|
};
|
|
}
|