mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
home-manager: improve robustness
With this commit the activation script is run only if nix-build succeeded.
This commit is contained in:
parent
a617aeaa73
commit
cbc4188b68
1 changed files with 8 additions and 8 deletions
|
@ -12,14 +12,14 @@ function doRebuild() {
|
|||
local wrkdir
|
||||
wrkdir="$(mktemp -d)"
|
||||
|
||||
nix-build --show-trace \
|
||||
"@HOME_MANAGER_EXPR_PATH@" \
|
||||
--argstr modulesPath "@MODULES_PATH@" \
|
||||
--argstr confPath "$confFile" \
|
||||
-A activation-script \
|
||||
-o "$wrkdir/generation"
|
||||
|
||||
"$wrkdir/generation/activate"
|
||||
if nix-build --show-trace \
|
||||
"@HOME_MANAGER_EXPR_PATH@" \
|
||||
--argstr modulesPath "@MODULES_PATH@" \
|
||||
--argstr confPath "$confFile" \
|
||||
-A activation-script \
|
||||
-o "$wrkdir/generation" ; then
|
||||
"$wrkdir/generation/activate"
|
||||
fi
|
||||
|
||||
rm -r "$wrkdir"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue