From 43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 14 May 2025 10:50:27 +0200 Subject: ... --- system-profiles/default-locale.nix | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'system-profiles/default-locale.nix') diff --git a/system-profiles/default-locale.nix b/system-profiles/default-locale.nix index 2d483f04..60d338cb 100644 --- a/system-profiles/default-locale.nix +++ b/system-profiles/default-locale.nix @@ -1,16 +1,23 @@ -{ lib, ... }: +{ lib, options, ... }: with lib; { - i18n = { - defaultLocale = "en_DK.UTF-8"; - extraLocaleSettings = { - "TIME_STYLE" = "long-iso"; - }; - supportedLocales = [ "C.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ]; - }; - console.keyMap = mkDefault "dvorak-programmer"; + config = foldr recursiveUpdate {} ([ + { + i18n = { + defaultLocale = "en_DK.UTF-8"; + extraLocaleSettings = { + "TIME_STYLE" = "long-iso"; + }; + }; + console.keyMap = mkDefault "dvorak-programmer"; - time.timeZone = mkDefault "Europe/Berlin"; + time.timeZone = mkDefault "Europe/Berlin"; + } + ] ++ (optional (options ? i18n.extraLocales) { + i18n.extraLocales = [ "C.UTF-8" "en_US.UTF-8" "en_DK.UTF-8" ]; + }) ++ (optional (!(options ? i18n.extraLocales)) { + i18n.supportedLocales = [ "C.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ]; + })); } -- cgit v1.2.3