commit c59dc8979f213fde1f3a84d665f312a66161bf09 parent 9b8c1369f2c2e89ca4e2a061b2a1afcde8c38f25 Author: breadcat <breadcat@users.noreply.github.com> Date: Thu, 3 Sep 2026 16:23:26 +0100 Locale variable Diffstat:
| M | common/locale.nix | | | 25 | +++++++++++-------------- |
| M | variables.sample.nix | | | 1 | + |
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/common/locale.nix b/common/locale.nix @@ -1,21 +1,18 @@ { vars, ... }: -let - locale = "en_GB.UTF-8"; -in { - time.timeZone = "${vars.user.timezone}"; - i18n.defaultLocale = locale; + time.timeZone = vars.user.timezone; + i18n.defaultLocale = vars.user.locale; i18n.extraLocaleSettings = { - LC_ADDRESS = locale; - LC_IDENTIFICATION = locale; - LC_MEASUREMENT = locale; - LC_MONETARY = locale; - LC_NAME = locale; - LC_NUMERIC = locale; - LC_PAPER = locale; - LC_TELEPHONE = locale; - LC_TIME = locale; + LC_ADDRESS = vars.user.locale; + LC_IDENTIFICATION = vars.user.locale; + LC_MEASUREMENT = vars.user.locale; + LC_MONETARY = vars.user.locale; + LC_NAME = vars.user.locale; + LC_NUMERIC = vars.user.locale; + LC_PAPER = vars.user.locale; + LC_TELEPHONE = vars.user.locale; + LC_TIME = vars.user.locale; }; services.xserver.xkb.layout = "gb"; console.keyMap = "uk"; diff --git a/variables.sample.nix b/variables.sample.nix @@ -7,6 +7,7 @@ rec { domain = "domain.com"; email = "${username}@${domain}"; timezone = "Europe/London"; + locale = "en_GB.UTF-8"; postcode = "AA1 1AA"; address = "123 Fake Street\n${postcode}\n${postcode}"; };