From 6739d8bb503d2ebab696544ec7755000b8e1b4f4 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Wed, 9 Dec 2020 13:18:07 +0100 Subject: [PATCH] targets/genericLinux: make locales work --- modules/targets/generic-linux.nix | 5 ++++- tests/modules/targets-linux/generic-linux.nix | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/targets/generic-linux.nix b/modules/targets/generic-linux.nix index cf6b2bd87..f813df9c5 100644 --- a/modules/targets/generic-linux.nix +++ b/modules/targets/generic-linux.nix @@ -32,7 +32,10 @@ in { dataDirs = concatStringsSep ":" (map (profile: "${profile}/share") profiles ++ config.targets.genericLinux.extraXdgDataDirs); - in { XDG_DATA_DIRS = "${dataDirs}\${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"; }; + in { + XDG_DATA_DIRS = "${dataDirs}\${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"; + LOCALE_ARCHIVE_2_27 = "${pkgs.glibcLocales}/lib/locale/locale-archive"; + }; home.sessionVariablesExtra = '' . "${pkgs.nix}/etc/profile.d/nix.sh" diff --git a/tests/modules/targets-linux/generic-linux.nix b/tests/modules/targets-linux/generic-linux.nix index 10481b5e9..c7b60b326 100644 --- a/tests/modules/targets-linux/generic-linux.nix +++ b/tests/modules/targets-linux/generic-linux.nix @@ -17,6 +17,9 @@ with lib; assertFileContains \ home-path/etc/profile.d/hm-session-vars.sh \ '. "${pkgs.nix}/etc/profile.d/nix.sh"' + assertFileContains \ + home-path/etc/profile.d/hm-session-vars.sh \ + 'export LOCALE_ARCHIVE_2_27="${pkgs.glibcLocales}/lib/locale/locale-archive"' ''; }; }