From e6214925fcc73ac8f0850a411b6e4b580a10a4fa Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Wed, 5 Mar 2025 06:14:29 +0800 Subject: [PATCH] refactor: move system locale options to their own file --- systems/modules/locale.nix | 17 +++++++++++++++++ systems/nemesis.nix | 19 +------------------ 2 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 systems/modules/locale.nix diff --git a/systems/modules/locale.nix b/systems/modules/locale.nix new file mode 100644 index 0000000..9a6d935 --- /dev/null +++ b/systems/modules/locale.nix @@ -0,0 +1,17 @@ +{ + time.timeZone = "Asia/Singapore"; + + i18n.defaultLocale = "en_SG.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_SG.UTF-8"; + LC_IDENTIFICATION = "en_SG.UTF-8"; + LC_MEASUREMENT = "en_SG.UTF-8"; + LC_MONETARY = "en_SG.UTF-8"; + LC_NAME = "en_SG.UTF-8"; + LC_NUMERIC = "en_SG.UTF-8"; + LC_PAPER = "en_SG.UTF-8"; + LC_TELEPHONE = "en_SG.UTF-8"; + LC_TIME = "en_SG.UTF-8"; + }; +} diff --git a/systems/nemesis.nix b/systems/nemesis.nix index fb0a5ab..85147da 100644 --- a/systems/nemesis.nix +++ b/systems/nemesis.nix @@ -6,6 +6,7 @@ # Include the results of the hardware scan. ./hw-nemesis.nix ./modules/networking.nix + ./modules/locale.nix ]; # Bootloader. @@ -14,24 +15,6 @@ networking.hostName = "nemesis"; # Define your hostname. - # Set your time zone. - time.timeZone = "Asia/Singapore"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_SG.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_SG.UTF-8"; - LC_IDENTIFICATION = "en_SG.UTF-8"; - LC_MEASUREMENT = "en_SG.UTF-8"; - LC_MONETARY = "en_SG.UTF-8"; - LC_NAME = "en_SG.UTF-8"; - LC_NUMERIC = "en_SG.UTF-8"; - LC_PAPER = "en_SG.UTF-8"; - LC_TELEPHONE = "en_SG.UTF-8"; - LC_TIME = "en_SG.UTF-8"; - }; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.rafiq = { isNormalUser = true;