nixos-rebuild: fix creating ./result symlink for flakes
(cherry picked from commit 531dc2e0f12673cce9cc6ea3dc5fd8bfef39c9bf)
This commit is contained in:
parent
34b9ccb9c8
commit
044a0d06c7
|
@ -215,7 +215,12 @@ nixBuild() {
|
|||
}
|
||||
|
||||
nixFlakeBuild() {
|
||||
if [ -z "$buildHost" ]; then
|
||||
if [[ -z "$buildHost" && -z "$targetHost" ]] &&
|
||||
! [ "$action" = switch -o "$action" = boot ]
|
||||
then
|
||||
nix "${flakeFlags[@]}" build "$@"
|
||||
readlink -f ./result
|
||||
elif [ -z "$buildHost" ]; then
|
||||
nix "${flakeFlags[@]}" build "$@" --out-link "${tmpDir}/result"
|
||||
readlink -f "${tmpDir}/result"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue