From: Dominik Kaiser Date: Mon, 17 Feb 2025 16:12:14 +0000 (+0100) Subject: Modularize locale X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=5a29538e79f6a8b0d57e23fc930ef6e8e1acaa7c;p=config%2Fnixos.git Modularize locale --- diff --git a/hosts/antares/configuration.nix b/hosts/antares/configuration.nix index 5ac3fe2..92284b6 100644 --- a/hosts/antares/configuration.nix +++ b/hosts/antares/configuration.nix @@ -9,6 +9,7 @@ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") ./disk-config.nix + ../common/global ]; boot.loader.grub = { # no need to set devices, disko will add all devices that have a EF02 partition to the list already @@ -33,7 +34,6 @@ }; networking.hostName = "antares"; - time.timeZone = "Europe/Berlin"; virtualisation.podman = { enable = true; diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix new file mode 100644 index 0000000..3af5cc8 --- /dev/null +++ b/hosts/common/global/default.nix @@ -0,0 +1,6 @@ +{ inputs, outputs, ... }: +{ + imports = [ + ./locale.nix + ]; +} \ No newline at end of file diff --git a/hosts/common/global/locale.nix b/hosts/common/global/locale.nix new file mode 100644 index 0000000..7bc53c2 --- /dev/null +++ b/hosts/common/global/locale.nix @@ -0,0 +1,18 @@ +{lib, ...}: +{ + time.timeZone = lib.mkDefault "Europe/Berlin"; + i18n = { + defaultLocale = lib.mkDefault "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = lib.mkDefault "en_IE.UTF-8"; + LC_IDENTIFICATION = lib.mkDefault "en_IE.UTF-8"; + LC_MEASUREMENT = lib.mkDefault "en_IE.UTF-8"; + LC_MONETARY = lib.mkDefault "en_IE.UTF-8"; + LC_NAME = lib.mkDefault "en_IE.UTF-8"; + LC_NUMERIC = lib.mkDefault "en_IE.UTF-8"; + LC_PAPER = lib.mkDefault "en_IE.UTF-8"; + LC_TELEPHONE = lib.mkDefault "en_IE.UTF-8"; + LC_TIME = lib.mkDefault "en_IE.UTF-8"; + }; + }; +} \ No newline at end of file diff --git a/hosts/sol/configuration.nix b/hosts/sol/configuration.nix index 27c3257..2106d05 100644 --- a/hosts/sol/configuration.nix +++ b/hosts/sol/configuration.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../common/global ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -26,24 +27,6 @@ # Enable networking networking.networkmanager.enable = true; - # Set your time zone. - time.timeZone = "Europe/Berlin"; - - # 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"; - }; - # Enable the X11 windowing system. services.xserver.enable = true;