summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorDominik Kaiser2025-02-17 17:12:14 +0100
committerDominik Kaiser2025-02-17 17:12:14 +0100
commit5a29538e79f6a8b0d57e23fc930ef6e8e1acaa7c (patch)
tree4f9ee3bb2ce9e4a1b50fcbe6ba2e8398db1326ce /hosts
parenta45cdec50ad86fe908f37d0ec38cfb48ac743726 (diff)
downloadnixos-5a29538e79f6a8b0d57e23fc930ef6e8e1acaa7c.tar.gz
nixos-5a29538e79f6a8b0d57e23fc930ef6e8e1acaa7c.zip
Modularize locale
Diffstat (limited to 'hosts')
-rw-r--r--hosts/antares/configuration.nix2
-rw-r--r--hosts/common/global/default.nix6
-rw-r--r--hosts/common/global/locale.nix18
-rw-r--r--hosts/sol/configuration.nix19
4 files changed, 26 insertions, 19 deletions
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;