From 65ba8d7b94af9fb9289555b7f1fa3b0515357bee Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Tue, 14 Nov 2023 17:10:36 +0100 Subject: [PATCH] pinwheel: Add `localisation` module --- hosts/pinwheel/configuration.nix | 18 ------------------ .../pinwheel/modules/localisation/default.nix | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 hosts/pinwheel/modules/localisation/default.nix diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index 35db3de..4f6d923 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -20,24 +20,6 @@ # Or disable the firewall altogether. # networking.firewall.enable = false; - # Set your time zone. - time.timeZone = "Europe/Stockholm"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "sv_SE.UTF-8"; - LC_IDENTIFICATION = "sv_SE.UTF-8"; - LC_MEASUREMENT = "sv_SE.UTF-8"; - LC_MONETARY = "sv_SE.UTF-8"; - LC_NAME = "sv_SE.UTF-8"; - LC_NUMERIC = "sv_SE.UTF-8"; - LC_PAPER = "sv_SE.UTF-8"; - LC_TELEPHONE = "sv_SE.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.alex = { isNormalUser = true; diff --git a/hosts/pinwheel/modules/localisation/default.nix b/hosts/pinwheel/modules/localisation/default.nix new file mode 100644 index 0000000..bf6d23c --- /dev/null +++ b/hosts/pinwheel/modules/localisation/default.nix @@ -0,0 +1,19 @@ +{ + time.timeZone = "Europe/Stockholm"; + + i18n = { + defaultLocale = "en_US.UTF-8"; + + extraLocaleSettings = { + LC_ADDRESS = "sv_SE.UTF-8"; + LC_IDENTIFICATION = "sv_SE.UTF-8"; + LC_MEASUREMENT = "sv_SE.UTF-8"; + LC_MONETARY = "sv_SE.UTF-8"; + LC_NAME = "sv_SE.UTF-8"; + LC_NUMERIC = "sv_SE.UTF-8"; + LC_PAPER = "sv_SE.UTF-8"; + LC_TELEPHONE = "sv_SE.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + }; +}