home-environment: use nix-env from PATH
It is safest to use the system install of Nix since that will be
compatible with the running nix-daemon and/or databases.
Also add a printout of the used Nix version in the activation script
when running in verbose mode.
Fixes #218.
(cherry picked from commit 19b4002f25
)
This commit is contained in:
parent
467ba9cafd
commit
f7628e2996
|
@ -313,7 +313,6 @@ in
|
|||
pkgs.gnugrep
|
||||
pkgs.gnused
|
||||
pkgs.ncurses # For `tput`.
|
||||
pkgs.nix
|
||||
]
|
||||
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function setupVars() {
|
||||
local profilesPath="/nix/var/nix/profiles/per-user/$USER"
|
||||
local gcPath="/nix/var/nix/gcroots/per-user/$USER"
|
||||
|
@ -46,6 +48,11 @@ else
|
|||
export DRY_RUN_CMD=""
|
||||
fi
|
||||
|
||||
if [[ -v VERBOSE ]]; then
|
||||
echo -n "Using Nix version: "
|
||||
nix-env --version
|
||||
fi
|
||||
|
||||
$VERBOSE_ECHO "Activation variables:"
|
||||
if [[ -v oldGenNum ]] ; then
|
||||
$VERBOSE_ECHO " oldGenNum=$oldGenNum"
|
||||
|
|
Loading…
Reference in a new issue