From 183a62f356f16d12ac60f0e4e5d54f0bd78f6ba6 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sun, 30 Oct 2022 21:19:58 -0500 Subject: [PATCH] targets/generic-linux: use the correct nix package --- modules/targets/generic-linux.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/targets/generic-linux.nix b/modules/targets/generic-linux.nix index aad74afb6..b5a07d5fa 100644 --- a/modules/targets/generic-linux.nix +++ b/modules/targets/generic-linux.nix @@ -8,6 +8,8 @@ let profileDirectory = config.home.profileDirectory; + nixPkg = if config.nix.package == null then pkgs.nix else config.nix.package; + in { imports = [ (mkRenamedOptionModule [ "targets" "genericLinux" "extraXdgDataDirs" ] [ @@ -55,7 +57,7 @@ in { }; home.sessionVariablesExtra = '' - . "${pkgs.nix}/etc/profile.d/nix.sh" + . "${nixPkg}/etc/profile.d/nix.sh" # reset TERM with new TERMINFO available (if any) export TERM="$TERM" @@ -64,7 +66,7 @@ in { # We need to source both nix.sh and hm-session-vars.sh as noted in # https://github.com/nix-community/home-manager/pull/797#issuecomment-544783247 programs.bash.initExtra = '' - . "${pkgs.nix}/etc/profile.d/nix.sh" + . "${nixPkg}/etc/profile.d/nix.sh" . "${profileDirectory}/etc/profile.d/hm-session-vars.sh" '';