mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
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.
This commit is contained in:
parent
b47cc4bc66
commit
19b4002f25
2 changed files with 7 additions and 1 deletions
|
@ -313,7 +313,6 @@ in
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.ncurses # For `tput`.
|
pkgs.ncurses # For `tput`.
|
||||||
pkgs.nix
|
|
||||||
]
|
]
|
||||||
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
function setupVars() {
|
function setupVars() {
|
||||||
local profilesPath="/nix/var/nix/profiles/per-user/$USER"
|
local profilesPath="/nix/var/nix/profiles/per-user/$USER"
|
||||||
local gcPath="/nix/var/nix/gcroots/per-user/$USER"
|
local gcPath="/nix/var/nix/gcroots/per-user/$USER"
|
||||||
|
@ -46,6 +48,11 @@ else
|
||||||
export DRY_RUN_CMD=""
|
export DRY_RUN_CMD=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -v VERBOSE ]]; then
|
||||||
|
echo -n "Using Nix version: "
|
||||||
|
nix-env --version
|
||||||
|
fi
|
||||||
|
|
||||||
$VERBOSE_ECHO "Activation variables:"
|
$VERBOSE_ECHO "Activation variables:"
|
||||||
if [[ -v oldGenNum ]] ; then
|
if [[ -v oldGenNum ]] ; then
|
||||||
$VERBOSE_ECHO " oldGenNum=$oldGenNum"
|
$VERBOSE_ECHO " oldGenNum=$oldGenNum"
|
||||||
|
|
Loading…
Reference in a new issue