From d674a3c251525ea93805d782bf46e5e1ef3101be Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 7 Sep 2019 13:16:39 +0000 Subject: activate: clean up references to built configs There's no reason to keep these around after updating the profile, and relying on the tmpfile cleaner to get them means it could be ages before they can be garbage-collected. --- activate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activate') diff --git a/activate b/activate index f5d4b0997ff0..a1bd8a1e08ba 100755 --- a/activate +++ b/activate @@ -23,8 +23,10 @@ else fi export NIX_PATH=nixos-config=$d/sys/$sys.nix:$d -link="$(mktemp -d)/result" +linkdir="$(mktemp -d)" +link="$linkdir/result" nix build -f '' --out-link "$link" "$@" system path="$(readlink "$link")" nix-env -p /nix/var/nix/profiles/system --set "$path" +rm -rf "$linkdir" exec "$path/bin/switch-to-configuration" switch -- cgit 1.4.1