From 44801d3c243b37bcafd6b698bd3026793cbd1951 Mon Sep 17 00:00:00 2001 From: Joshua Yuen Date: Mon, 28 Jul 2025 15:53:47 -0400 Subject: [PATCH] Add additional locale settings and keymap --- modules/core/system.nix | 15 +++++++++++++++ modules/options/system.nix | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/modules/core/system.nix b/modules/core/system.nix index 64c14e3..9e853bf 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -17,7 +17,22 @@ in }; }; + console.keyMap = cfg.keyMap; time.timeZone = cfg.timeZone; + i18n = { + defaultLocale = cfg.locale; + extraLocaleSettings = { + LC_ADDRESS = cfg.locale; + LC_IDENTIFICATION = cfg.locale; + LC_MEASUREMENT = cfg.locale; + LC_MONETARY = cfg.locale; + LC_NAME = cfg.locale; + LC_NUMERIC = cfg.locale; + LC_PAPER = cfg.locale; + LC_TELEPHONE = cfg.locale; + LC_TIME = cfg.locale; + }; + }; system.stateVersion = "25.05"; } \ No newline at end of file diff --git a/modules/options/system.nix b/modules/options/system.nix index 3858ed7..fe5ad96 100644 --- a/modules/options/system.nix +++ b/modules/options/system.nix @@ -9,6 +9,16 @@ let in { options.system = { + locale = mkOption { + type = types.str; + default = "en_US.UTF-8"; + }; + + keyMap = mkOption { + type = types.str; + default = "us"; + }; + timeZone = mkOption { type = types.str; default = "US/Eastern";