moving internationalization

This commit is contained in:
Zynh Ludwig 2024-06-28 18:38:03 -07:00
parent 4b72214967
commit 580e868f5a
3 changed files with 31 additions and 16 deletions

View file

@ -24,21 +24,6 @@
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
snowhawk.dwm.enable = true;
# Configure keymap in X11

View file

@ -1,7 +1,10 @@
{ ... }:
{ lib, ... }:
{
imports = [
./dwm.nix
./i18n.nix
];
snowhawk.i18n.enable = lib.mkDefault true;
}

27
modules/i18n.nix Normal file
View file

@ -0,0 +1,27 @@
{ lib, config, pkgs, ... }:
let
cfg = config.snowhawk.i18n;
in
{
options.snowhawk.i18n = {
enable = lib.mkEnableOption "i18n";
};
config = lib.mkIf cfg.enable {
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
}