From 16110bb3264199212769168145d8254f27b2138d Mon Sep 17 00:00:00 2001 From: LordGrimmauld Date: Sat, 16 Mar 2024 11:05:04 +0100 Subject: [PATCH] fix imports attempt to fix imports #3 attempt to fix imports #4 attempt to fix imports #5 attempt to fix imports #6 attempt to fix imports #7 attempt to fix imports #8 Revert "attempt to fix imports #8" This reverts commit 43b115c78e85f7e68ae935dc3cae703b7730e8ba. Revert "attempt to fix imports #7" This reverts commit 588c83aba244a5d02fd811bb565984169e769ff1. Revert "attempt to fix imports #6" This reverts commit f0640591656679a2e684d2198dd808498ca9dc80. Revert "attempt to fix imports #5" This reverts commit 61bd0e180b2f5f6ea823d88fa28a696c1fa72283. Revert "attempt to fix imports #4" This reverts commit 8cf9662367ab3b3cf45df212a38844b91442df28. more attempts more attempts #2 more attempts #3 more attempts #4 more attempts #5 Revert "more attempts #5" This reverts commit 24773ffd75faa777312dda09a52a791c14c10fb2. Revert "more attempts #4" This reverts commit 68de4fabbaad8dc8764711bd7c93bfde36d11df5. more attempts #6 --- default.nix | 6 ++---- modules/localisation.nix | 44 ++++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/default.nix b/default.nix index 65ab9a8..feec78f 100644 --- a/default.nix +++ b/default.nix @@ -13,8 +13,6 @@ in { }; }; - imports = [] ++ - (optionals cfg.enable ([] - ++ optionals cfg.enableLocale [./modules/localisation.nix] - )); + imports = [./modules/localisation.nix] + ; } diff --git a/modules/localisation.nix b/modules/localisation.nix index 1ad7e81..43593d8 100644 --- a/modules/localisation.nix +++ b/modules/localisation.nix @@ -1,25 +1,29 @@ -{ - time.timeZone = "Europe/Berlin"; +{ config, lib, ... }: let + cfg = config.grimmShared; +in { + config = with cfg; lib.mkIf (enable && enableLocale) { + time.timeZone = "Europe/Berlin"; - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; + console.keyMap = "de"; - console.keyMap = "de"; - - services.xserver.xkb = { - layout = "de"; - variant = ""; + services.xserver.xkb = { + layout = "de"; + variant = ""; + }; }; }