rebuild: Fix

This commit is contained in:
Geoffrey Frogeye 2025-01-23 18:45:35 +01:00
parent cce96e063d
commit e113b70357
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -29,10 +29,12 @@ info "Evaluating"
# which can be limiting on memory-constrained devices. Hence the build step is separate.
# nix eval doesn't use the eval cache, so we do a nix build --dry-run
# sudo so the eval cache is shared with nixos-rebuild
toplevel=$(time sudo nix build "$self#nixosConfigurations.$HOSTNAME.config.system.build.toplevel" --dry-run --json | jq '.[0].outputs.out' -r)
json=$(time sudo nix build "$self#nixosConfigurations.$HOSTNAME.config.system.build.toplevel" --dry-run --json )
toplevel=$(echo "$json" | jq '.[0].outputs.out' -r)
derivation=$(echo "$json" | jq '.[0].drvPath' -r)
info "Building"
sudo nom build "$toplevel" --no-link "$@"
sudo nom build "$derivation^*" --no-link "$@"
info "Showing diff"
nvd diff "$(readlink -f /nix/var/nix/profiles/system)" "$toplevel"