diff options
| author | adikro <adikro@disroot.org> | 2025-12-18 21:04:00 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-18 21:04:00 +0100 |
| commit | e60410393cea222b16743a1a87f29c06b9b3543b (patch) | |
| tree | 8a574048613f6b13024795bd710b824b40f5db18 /modules/sys/core/localization.nix | |
| parent | ea3bf9c87ee72d6da5ea2316b229082c7fc9cdf6 (diff) | |
rewrite of system modules, hm modules are next
Diffstat (limited to 'modules/sys/core/localization.nix')
| -rw-r--r-- | modules/sys/core/localization.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/modules/sys/core/localization.nix b/modules/sys/core/localization.nix new file mode 100644 index 0000000..232133d --- /dev/null +++ b/modules/sys/core/localization.nix @@ -0,0 +1,39 @@ +{ config, lib, ... }: +{ + options.szpont.locale = { + enable = lib.mkEnableOption "system localization (timezone and language)"; + + timeZone = lib.mkOption { + type = lib.types.str; + default = "Europe/Warsaw"; + description = "the system timezone."; + }; + + format = lib.mkOption { + type = lib.types.str; + default = "pl_PL.UTF-8"; + description = "the locale used for numbers, time, and measurements."; + }; + }; + + config = lib.mkIf config.szpont.locale.enable { + time.timeZone = config.szpont.locale.timeZone; + + i18n = { + defaultLocale = "en_US.UTF-8"; + + extraLocaleSettings = { + LC_TIME = config.szpont.locale.format; + LC_NUMERIC = config.szpont.locale.format; + LC_MONETARY = config.szpont.locale.format; + LC_PAPER = config.szpont.locale.format; + LC_MEASUREMENT = config.szpont.locale.format; + LC_COLLATE = config.szpont.locale.format; + LC_NAME = config.szpont.locale.format; + LC_ADDRESS = config.szpont.locale.format; + LC_TELEPHONE = config.szpont.locale.format; + LC_IDENTIFICATION = config.szpont.locale.format; + }; + }; + }; +} |
