This commit is contained in:
2025-08-29 15:25:40 +02:00
parent 26440bfeee
commit f3821f0dfa
201 changed files with 2461 additions and 1546 deletions

View File

@@ -2,8 +2,14 @@
config,
lib,
...
}: let
inherit (lib) mkIf mkOption mkDefault types;
}:
let
inherit (lib)
mkIf
mkOption
mkDefault
types
;
cfg = config.nixos.system.locale;
defaultCategories = [
"LC_ADDRESS"
@@ -16,7 +22,8 @@
"LC_TELEPHONE"
"LC_TIME"
];
in {
in
{
options = {
nixos.system.locale = {
enable = mkOption {
@@ -58,7 +65,7 @@ in {
time.timeZone = mkDefault cfg.timeZone;
i18n.defaultLocale = mkDefault cfg.defaultLocale;
i18n.extraLocaleSettings = mkIf (cfg.extraLocale != null) (
lib.foldl' (attrs: lc: attrs // {"${lc}" = cfg.extraLocale;}) {} cfg.categories
lib.foldl' (attrs: lc: attrs // { "${lc}" = cfg.extraLocale; }) { } cfg.categories
);
};
}