diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index dd5e0ae2550..8182b8ae808 100644 --- a/nixos/modules/config/i18n.nix +++ b/nixos/modules/config/i18n.nix @@ -76,7 +76,12 @@ in environment.systemPackages = [ glibcLocales ]; - environment.variables.LANG = config.i18n.defaultLocale; + environment.variables = + { LANG = config.i18n.defaultLocale; + LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; + }; + + systemd.globalEnvironment.LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; # ‘/etc/locale.conf’ is used by systemd. environment.etc = singleton diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix index 831c04f1ad8..aa9aec07834 100644 --- a/nixos/modules/programs/environment.nix +++ b/nixos/modules/programs/environment.nix @@ -17,8 +17,7 @@ in config = { environment.variables = - { LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; - LOCATE_PATH = "/var/cache/locatedb"; + { LOCATE_PATH = "/var/cache/locatedb"; NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix"; NIX_PATH = [ "/nix/var/nix/profiles/per-user/root/channels/nixos" diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 5bc140ca242..b66ccb87120 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -258,7 +258,6 @@ in path = [ pkgs.openssh pkgs.gawk ]; environment.LD_LIBRARY_PATH = nssModulesPath; - environment.LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; preStart = ''