ssh:// (aka nix-store —serve protocol) simply doesn’t have a notion of checking signatures and doesn’t pass the flag for checking signatures on the remote.
In fact, it always doesn’t check signatures – hence why it requires the remote user to be trusted by the daemon the nix-store —serve process is talking to on the remote machine (in case it’s not interacting with a local store directly).
hi @xokdvium , if I am understanding your response correctly, ssh-ng by default checks the signatures whereas ssh does not. Thus the reason why remote build fails with ssh-ng.
In both cases (ssh:// and ssh-ng://), the authenticated user is root on remote machine (remotetarget1). root by default is a trusted-user of the nix-store daemon.
So in theory, it should build without the signature check error. But it does not.
Ah, I don’t actually know how one would pass this down the call stack from nixos-rebuild. I’d probably copy the built systems closure manually via nix copy
Seems with nixos-rebuild, need to set require-sigs [1] to false in nix configuration on remote machine to get the equivalent of the --no-check-sigs flag on nix copy.
I have not used it, but I think nh actually uses --no-check-sigs when copying. Although I think nixos-rebuild should probably have an argument to do that too, but it does not.