From 139a6fd8f66aec06477f908ff6b619759d971ec0 Mon Sep 17 00:00:00 2001 From: Liam Hupfer Date: Thu, 1 Jul 2021 13:27:52 -0500 Subject: [PATCH] Fix setting home-manager session variables https://github.com/nix-community/home-manager/issues/1011 --- profiles/system/base.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/profiles/system/base.nix b/profiles/system/base.nix index ceed75f..bd8f516 100644 --- a/profiles/system/base.nix +++ b/profiles/system/base.nix @@ -8,6 +8,11 @@ in { mkEnableOption "my system base configuration"; config = mkIf cfg.enable { + environment.extraInit = concatMapStringsSep "\n" (user: '' + if [ "$(id -un)" = "${user}" ]; then + . /etc/profiles/per-user/${user}/etc/profile.d/hm-session-vars.sh + fi + '') [ "lh" ]; environment.etc."nixos/overlays-compat/overlays.nix".text = builtins.readFile ./../../pkgs/overlays.nix;