From d3067f9547f7e9d23e4f537bc1a752bdac4ab336 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 21 Jul 2023 01:35:01 +0200 Subject: [PATCH 1/3] Common: move localisation settings to configuration.nix --- machines/Archie/configuration.nix | 2 -- machines/Everest/configuration.nix | 17 ----------------- machines/SurfaceGo/configuration.nix | 2 -- roles/common/configuration.nix | 18 +++++++++++++++++- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/machines/Archie/configuration.nix b/machines/Archie/configuration.nix index 4b56c96..cb196e3 100644 --- a/machines/Archie/configuration.nix +++ b/machines/Archie/configuration.nix @@ -33,8 +33,6 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; console = { keyMap = "es"; }; diff --git a/machines/Everest/configuration.nix b/machines/Everest/configuration.nix index 2b6f110..85ff132 100755 --- a/machines/Everest/configuration.nix +++ b/machines/Everest/configuration.nix @@ -32,23 +32,6 @@ nameservers = [ "8.8.8.8" ]; }; - # Set your time zone. - time.timeZone = "Europe/Madrid"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "es_ES.UTF-8"; - LC_IDENTIFICATION = "es_ES.UTF-8"; - LC_MEASUREMENT = "es_ES.UTF-8"; - LC_MONETARY = "es_ES.UTF-8"; - LC_NAME = "es_ES.UTF-8"; - LC_NUMERIC = "es_ES.UTF-8"; - LC_PAPER = "es_ES.UTF-8"; - LC_TELEPHONE = "es_ES.UTF-8"; - LC_TIME = "es_ES.UTF-8"; - }; # Configure keymap in X11 services.xserver = { diff --git a/machines/SurfaceGo/configuration.nix b/machines/SurfaceGo/configuration.nix index f0e31af..ef12065 100644 --- a/machines/SurfaceGo/configuration.nix +++ b/machines/SurfaceGo/configuration.nix @@ -33,8 +33,6 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; console = { keyMap = "es"; }; diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index ba301c4..8a02771 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -17,7 +17,23 @@ # Cleaning out /tmp at boot if it's a tmpfs is quite stupid cleanOnBoot = !config.boot.tmp.useTmpfs; }; - + + # Set up localisation + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_NUMERIC = "es_ES.UTF-8"; + # am/pm is nice but mm/dd/yy is yucky + LC_TIME = "es_US.UTF-8"; + LC_MONETARY = "es_ES.UTF-8"; + LC_MEASUREMENT = "es_ES.UTF-8"; + LC_PAPER = "es_ES.UTF-8"; + LC_ADDRESS = "es_US.UTF-8"; + LC_NAME = "es_ES.UTF-8"; + LC_TELEPHONE = "es_ES.UTF-8"; + }; + }; + # Set up secrets age = { identityPaths = [ From 62a2fda28703eda1283ad6a0972e37d16caa1db3 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 21 Jul 2023 01:45:57 +0200 Subject: [PATCH 2/3] Common: set up timezone on configuration.nix --- machines/Archie/configuration.nix | 3 --- machines/Everest/configuration.nix | 1 - machines/SurfaceGo/configuration.nix | 3 --- roles/common/configuration.nix | 3 +++ 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/machines/Archie/configuration.nix b/machines/Archie/configuration.nix index cb196e3..020dc55 100644 --- a/machines/Archie/configuration.nix +++ b/machines/Archie/configuration.nix @@ -26,9 +26,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # Set your time zone. - time.timeZone = "Europe/Madrid"; - # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; diff --git a/machines/Everest/configuration.nix b/machines/Everest/configuration.nix index 85ff132..b97449a 100755 --- a/machines/Everest/configuration.nix +++ b/machines/Everest/configuration.nix @@ -32,7 +32,6 @@ nameservers = [ "8.8.8.8" ]; }; - # Configure keymap in X11 services.xserver = { layout = "es"; diff --git a/machines/SurfaceGo/configuration.nix b/machines/SurfaceGo/configuration.nix index ef12065..05f9686 100644 --- a/machines/SurfaceGo/configuration.nix +++ b/machines/SurfaceGo/configuration.nix @@ -26,9 +26,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # Set your time zone. - time.timeZone = "Europe/Madrid"; - # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index 8a02771..9fc3089 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -34,6 +34,9 @@ }; }; + # Set up time zone. + time.timeZone = "Europe/Madrid"; + # Set up secrets age = { identityPaths = [ From 7e0a707db500a2a2f6d6ceee95b597c32d61ad70 Mon Sep 17 00:00:00 2001 From: Toast Date: Fri, 21 Jul 2023 18:44:32 +0200 Subject: [PATCH 3/3] Common: set up default keyboard layout --- machines/Archie/configuration.nix | 4 ---- machines/Everest/configuration.nix | 9 --------- machines/SurfaceGo/configuration.nix | 4 ---- roles/common/configuration.nix | 5 +++++ 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/machines/Archie/configuration.nix b/machines/Archie/configuration.nix index 020dc55..dfd748a 100644 --- a/machines/Archie/configuration.nix +++ b/machines/Archie/configuration.nix @@ -30,10 +30,6 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - console = { - keyMap = "es"; - }; - # Enable the X11 windowing system. services.xserver.enable = true; diff --git a/machines/Everest/configuration.nix b/machines/Everest/configuration.nix index b97449a..8cd3198 100755 --- a/machines/Everest/configuration.nix +++ b/machines/Everest/configuration.nix @@ -32,15 +32,6 @@ nameservers = [ "8.8.8.8" ]; }; - # Configure keymap in X11 - services.xserver = { - layout = "es"; - xkbVariant = ""; - }; - - # Configure console keymap - console.keyMap = "es"; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.toast = { isNormalUser = true; diff --git a/machines/SurfaceGo/configuration.nix b/machines/SurfaceGo/configuration.nix index 05f9686..3f91f65 100644 --- a/machines/SurfaceGo/configuration.nix +++ b/machines/SurfaceGo/configuration.nix @@ -30,10 +30,6 @@ # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - console = { - keyMap = "es"; - }; - # Enable the X11 windowing system. services.xserver.enable = true; diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index 9fc3089..67ea919 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -18,6 +18,11 @@ cleanOnBoot = !config.boot.tmp.useTmpfs; }; + # Set up keyboard layout + services.xserver.layout = "es"; + # Make the console use X's keyboard configuration + console.useXkbConfig = true; + # Set up localisation i18n = { defaultLocale = "en_US.UTF-8";