From e6ca3fc97641974be0810fbbba1ca1cc7b4d5396 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 16 Dec 2021 12:07:46 -0300 Subject: [PATCH] Revert "nixos-rebuild: switch to tmpDir during rebuilds" This seems to break `boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages` causing it to use `linuxPackages`. --- pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh index 7f6d6ce22827..e5e40dca086e 100755 --- a/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh +++ b/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh @@ -362,16 +362,14 @@ if [ "$action" = edit ]; then exit 1 fi -ORIGIN_PWD="$PWD" + tmpDir=$(mktemp -t -d nixos-rebuild.XXXXXX) SSHOPTS="$NIX_SSHOPTS -o ControlMaster=auto -o ControlPath=$tmpDir/ssh-%n -o ControlPersist=60" -cd "$tmpDir" cleanup() { for ctrl in "$tmpDir"/ssh-*; do ssh -o ControlPath="$ctrl" -O exit dummyhost 2>/dev/null || true done - cd "$ORIGIN_PWD" rm -rf "$tmpDir" } trap cleanup EXIT