diff options
Diffstat (limited to 'nixos/modules/config/i18n.nix')
-rw-r--r-- | nixos/modules/config/i18n.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index d3f24e280c7..f2aacf9b292 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -74,14 +74,17 @@ in config = { - environment.systemPackages = [ glibcLocales ]; + environment.systemPackages = + optional (config.i18n.supportedLocales != []) glibcLocales; environment.sessionVariables = { LANG = config.i18n.defaultLocale; LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; }; - systemd.globalEnvironment.LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; + systemd.globalEnvironment = mkIf (config.i18n.supportedLocales != []) { + LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; + }; # ‘/etc/locale.conf’ is used by systemd. environment.etc = singleton |