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
|
@ -12,14 +12,14 @@ function doRebuild() {
|
|||
local wrkdir
|
||||
wrkdir="$(mktemp -d)"
|
||||
|
||||
nix-build --show-trace \
|
||||
if nix-build --show-trace \
|
||||
"@HOME_MANAGER_EXPR_PATH@" \
|
||||
--argstr modulesPath "@MODULES_PATH@" \
|
||||
--argstr confPath "$confFile" \
|
||||
-A activation-script \
|
||||
-o "$wrkdir/generation"
|
||||
|
||||
-o "$wrkdir/generation" ; then
|
||||
"$wrkdir/generation/activate"
|
||||
fi
|
||||
|
||||
rm -r "$wrkdir"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue