mirror of
https://github.com/nix-community/home-manager
synced 2024-12-12 12:59:49 +01:00
home-manager: add activation sanity check of Nix
This adds an empty `nix-build` command to verify that the user is
having a good Nix install. It also, as a side effect, will create the
necessary per-user `profiles` and `gcroots` directories.
Fixes #1246
(cherry picked from commit dcbe0f2a31
)
This commit is contained in:
parent
25ddbf4824
commit
c91b2f4556
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,11 @@ fi
|
||||||
|
|
||||||
echo "Starting home manager activation"
|
echo "Starting home manager activation"
|
||||||
|
|
||||||
|
# Verify that we can connect to the Nix store and/or daemon. This will
|
||||||
|
# also create the necessary directories in profiles and gcroots.
|
||||||
|
$VERBOSE_ECHO "Sanity checking Nix"
|
||||||
|
nix-build --expr '{}' --no-out-link
|
||||||
|
|
||||||
setupVars
|
setupVars
|
||||||
|
|
||||||
if [[ -v DRY_RUN ]] ; then
|
if [[ -v DRY_RUN ]] ; then
|
||||||
|
|
Loading…
Reference in a new issue