diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-18 19:03:50 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-18 19:04:45 +0200 |
commit | 465d6ff5722cf1c9b7e58793ed50c5bc750c5098 (patch) | |
tree | a7ae6495fa6991ac300ae2f66cda19bccad04bbc | |
parent | 313c38d5f1aeda1b065ba9b15380918ebd771c99 (diff) | |
download | nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.tar nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.tar.gz nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.tar.bz2 nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.tar.lz nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.tar.xz nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.tar.zst nixlib-465d6ff5722cf1c9b7e58793ed50c5bc750c5098.zip |
Set $LOCALE_ARCHIVE in all systemd units
This variable used to be inherited implicitly from the stage-2 script, but systemd now clears the environment. So we need to set it explicitly.
-rw-r--r-- | nixos/modules/config/i18n.nix | 7 | ||||
-rw-r--r-- | nixos/modules/programs/environment.nix | 3 | ||||
-rw-r--r-- | nixos/modules/services/networking/ssh/sshd.nix | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix index dd5e0ae25509..8182b8ae8081 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 831c04f1ad86..aa9aec078342 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 5bc140ca242a..b66ccb87120c 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 = '' |