Loading
nixos-rebuild-ng: don't resolve /run/current-system symlink for --diff
Before running `nix store diff-closures`, `nixos-rebuild-ng` tried to read the symlink on the local system. While this provides for better logging, when paired with `--target-host`, it causes deploy failures as it tries to diff the config of the local system against the target. Even if the store path of the local system happens to be on the target, the diff is incorrect, as its comparing two different systems against each other instead of the old and new closures on the target system. Accordingly, we simply avoid resolving the symlink on the host system. If a future solution would like to fix this, it should make sure to do the reading for debug printing on the *target* sytem, not the local one.