1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +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
This commit is contained in:
Robert Helgesson 2020-05-20 22:17:37 +02:00
parent cc48e15f28
commit dcbe0f2a31
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -50,6 +50,11 @@ fi
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
if [[ -v DRY_RUN ]] ; then