Files
nixos-blueprint/modules/nixos/system/misc/locale.nix
2025-04-03 18:30:11 +03:00

34 lines
718 B
Nix

{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
in {
options = {
locale.ukrainian.enable =
mkEnableOption "enables ukrainian locale";
};
config = mkIf config.locale.ukrainian.enable {
i18n = let
locale = "uk_UA.UTF-8";
in {
defaultLocale = locale;
extraLocaleSettings = {
LC_ADDRESS = locale;
LC_COLLATE = "en_US.UTF-8";
LC_CTYPE = locale;
LC_IDENTIFICATION = locale;
LC_MEASUREMENT = locale;
LC_MESSAGES = locale;
LC_MONETARY = locale;
LC_NAME = locale;
LC_NUMERIC = locale;
LC_PAPER = locale;
LC_TELEPHONE = locale;
LC_TIME = locale;
};
};
};
}