targets/generic-linux: use the correct nix package

(cherry picked from commit 183a62f356)
This commit is contained in:
David Arnold 2022-10-30 21:19:58 -05:00 committed by Robert Helgesson
parent d78b3488a7
commit d148e1dd61
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -8,6 +8,8 @@ let
profileDirectory = config.home.profileDirectory; profileDirectory = config.home.profileDirectory;
nixPkg = if config.nix.package == null then pkgs.nix else config.nix.package;
in { in {
imports = [ imports = [
(mkRenamedOptionModule [ "targets" "genericLinux" "extraXdgDataDirs" ] [ (mkRenamedOptionModule [ "targets" "genericLinux" "extraXdgDataDirs" ] [
@ -55,7 +57,7 @@ in {
}; };
home.sessionVariablesExtra = '' home.sessionVariablesExtra = ''
. "${pkgs.nix}/etc/profile.d/nix.sh" . "${nixPkg}/etc/profile.d/nix.sh"
# reset TERM with new TERMINFO available (if any) # reset TERM with new TERMINFO available (if any)
export TERM="$TERM" export TERM="$TERM"
@ -64,7 +66,7 @@ in {
# We need to source both nix.sh and hm-session-vars.sh as noted 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 # https://github.com/nix-community/home-manager/pull/797#issuecomment-544783247
programs.bash.initExtra = '' programs.bash.initExtra = ''
. "${pkgs.nix}/etc/profile.d/nix.sh" . "${nixPkg}/etc/profile.d/nix.sh"
. "${profileDirectory}/etc/profile.d/hm-session-vars.sh" . "${profileDirectory}/etc/profile.d/hm-session-vars.sh"
''; '';