home-manager: make sure Nix profiles path exists
The Nix profiles path may not exist right after installing Nix. In that case, it is created on demand by the Nix CLI tools. However, Home Manager assumes it exists and fails if it doesn't. This change makes sure to trigger the creation of the Nix profiles path before attempting to access it.
This commit is contained in:
parent
28698126bd
commit
fe1e2dee19
|
@ -105,6 +105,9 @@ _i "Starting Home Manager activation"
|
||||||
$VERBOSE_RUN _i "Sanity checking Nix"
|
$VERBOSE_RUN _i "Sanity checking Nix"
|
||||||
nix-build --expr '{}' --no-out-link
|
nix-build --expr '{}' --no-out-link
|
||||||
|
|
||||||
|
# Also make sure that the Nix profiles path is created.
|
||||||
|
nix-env -q > /dev/null 2>&1
|
||||||
|
|
||||||
migrateProfile
|
migrateProfile
|
||||||
setupVars
|
setupVars
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue