mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 17:19:45 +01:00
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
1 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,9 @@ _i "Starting Home Manager activation"
|
|||
$VERBOSE_RUN _i "Sanity checking Nix"
|
||||
nix-build --expr '{}' --no-out-link
|
||||
|
||||
# Also make sure that the Nix profiles path is created.
|
||||
nix-env -q > /dev/null 2>&1
|
||||
|
||||
migrateProfile
|
||||
setupVars
|
||||
|
||||
|
|
Loading…
Reference in a new issue