rebuild: Fix
This commit is contained in:
parent
cce96e063d
commit
e113b70357
|
@ -29,10 +29,12 @@ info "Evaluating"
|
||||||
# which can be limiting on memory-constrained devices. Hence the build step is separate.
|
# 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
|
# 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
|
# 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"
|
info "Building"
|
||||||
sudo nom build "$toplevel" --no-link "$@"
|
sudo nom build "$derivation^*" --no-link "$@"
|
||||||
|
|
||||||
info "Showing diff"
|
info "Showing diff"
|
||||||
nvd diff "$(readlink -f /nix/var/nix/profiles/system)" "$toplevel"
|
nvd diff "$(readlink -f /nix/var/nix/profiles/system)" "$toplevel"
|
||||||
|
|
Loading…
Reference in a new issue