From 6ef625239ca09be09311c5bc2c27c13f1225ef54 Mon Sep 17 00:00:00 2001 From: servostar Date: Sat, 23 Dec 2023 12:33:41 +0100 Subject: [PATCH] moved locale to settings --- configuration.nix | 37 ++++++++++++------------------------- settings.nix | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/configuration.nix b/configuration.nix index 3a2140b..9f3e49c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -27,37 +27,24 @@ in hardware.opengl.enable = true; - # Set your time zone. - time.timeZone = "Europe/Berlin"; + # Set your time zone. + time.timeZone = settings.system.timeZone; - # 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"; - }; - - services.rpcbind.enable = true; # needed for NFS + # Select internationalisation properties. + i18n.defaultLocale = settings.system.defaultLocale; + i18n.extraLocaleSettings = settings.system.extraLocales; programs.partition-manager.enable = true; - # use bash shell for other users - environment.shells = with pkgs; [ bash ]; + # use bash shell for other users + environment.shells = with pkgs; [ bash ]; - # Configure console keymap - console.keyMap = "de"; + # Configure console keymap + console.keyMap = settings.system.ttykeymap; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = (with pkgs; [ + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = (with pkgs; [ devbox ffmpeg-full diff --git a/settings.nix b/settings.nix index 1d3e9f3..308dc73 100644 --- a/settings.nix +++ b/settings.nix @@ -2,6 +2,23 @@ with import {}; { stateVersion = "23.11"; + system = { + ttykeymap = "de"; + timeZone = "Europe/Berlin"; + defaultLocale = "en_US.UTF-8"; + extraLocales = { + 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 = "en_US.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + }; + hardware = { # support for GPUs amdgpu = true;