From 5a4bc7ce3124e9fc55272a97c8e54f0d9988bd2a Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sun, 5 Jan 2025 21:31:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Zed=20edito?= =?UTF-8?q?r=20and=20nil=20ls,=20refactored=20locales?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/development.nix | 2 ++ modules/locale.nix | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/modules/development.nix b/modules/development.nix index 9c3d445..46b0784 100644 --- a/modules/development.nix +++ b/modules/development.nix @@ -6,6 +6,7 @@ jetbrains.rust-rover jetbrains.webstorm vscodium # TODO set up extensions + zed-editor # Tools git rustup @@ -14,6 +15,7 @@ gcc # Required for C, Rust and others # Language servers nixd + nil # Formatters nixfmt-rfc-style treefmt diff --git a/modules/locale.nix b/modules/locale.nix index c5db006..a050f09 100644 --- a/modules/locale.nix +++ b/modules/locale.nix @@ -1,27 +1,32 @@ { ... }: # TODO move locale config for hyprland here +let + utf-8 = "UTF-8"; + en = "en_GB.${utf-8}"; + nb = "nb_NO.${utf-8}"; +in { # Configure console keymap console.keyMap = "uk"; # Select internationalisation properties. i18n = { - defaultLocale = "en_GB.UTF-8"; + defaultLocale = en; supportedLocales = [ - "en_GB.UTF-8/UTF-8" - "nb_NO.UTF-8/UTF-8" + "${en}/${utf-8}" + "${nb}/${utf-8}" ]; extraLocaleSettings = { - LC_ADDRESS = "nb_NO.UTF-8"; - LC_IDENTIFICATION = "nb_NO.UTF-8"; - LC_MEASUREMENT = "nb_NO.UTF-8"; - LC_MONETARY = "nb_NO.UTF-8"; - LC_NAME = "nb_NO.UTF-8"; - LC_NUMERIC = "nb_NO.UTF-8"; - LC_PAPER = "nb_NO.UTF-8"; - LC_TELEPHONE = "nb_NO.UTF-8"; - LC_TIME = "nb_NO.UTF-8"; + LC_ADDRESS = nb; + LC_IDENTIFICATION = nb; + LC_MEASUREMENT = nb; + LC_MONETARY = nb; + LC_NAME = nb; + LC_NUMERIC = nb; + LC_PAPER = nb; + LC_TELEPHONE = nb; + LC_TIME = nb; }; };