nix-community/nixos-anywhere

terminate called after throwing an instance of 'nix::EndOfFile'

Closed this issue · 3 comments

nix run github:nix-community/nixos-anywhere -- --flake '.#thinkpad-t420s' --option pure-eval false --build-on-remote --print-build-logs --debug nixos@192.168.0.185
+ echo '### Building the system closure ###'
### Building the system closure ###
+ nix_copy --to 'ssh-ng://root@192.168.0.185?remote-store=local?root=/mnt' '.#nixosConfigurations."thinkpad-t420s".config.system.build.toplevel' --derivation --no-check-sigs
+ NIX_SSHOPTS='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /tmp/tmp.nVckaJyRR0/nixos-anywhere '
+ nix copy --extra-experimental-features 'nix-command flakes' --no-write-lock-file --option pure-eval false --option substituters https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store -L --substitute-on-destination --to 'ssh-ng://root@192.168.0.185?remote-store=local?root=/mnt' '.#nixosConfigurations."thinkpad-t420s".config.system.build.toplevel' --derivation --no-check-sigs
trace: warning: system.stateVersion is not set, defaulting to 24.05. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
Warning: Permanently added '192.168.0.185' (ED25519) to the list of known hosts.
[903 copied (125793.2 MiB), 29.1 MiB DL] copying 11860 pathsToo many root sets


/nix/store/mcs3xh1796znybj8f4px5l3q552w1pw7-nixos-anywhere-1.2.0/libexec/nixos-anywhere/nixos-anywhere.sh: line 203: 614226 Aborted                 (core dumped) NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $ssh_key_dir/nixos-anywhere ${ssh_args[*]}" nix copy "${nix_options[@]}" "${nix_copy_options[@]}" "$@"
+ rm -rf /tmp/tmp.nVckaJyRR0
terminate called after throwing an instance of 'nix::EndOfFile'
  what():  error: unexpected end-of-file

Is it possible that this is caused by the USB disk having too little capacity?

I encountered this problem when I tried to build a nixos system (thinkpad-t420s) configured with more software in a nixos livecd (no-os), but I installed it successfully after minimal configuration (thinkpad-t420s-minimal).

Then I ran nixos with this minimal configuration (thinkpad-t420s-minimal)

Then pass sudo nixos-rebuild switch --flake .#thinkpad-t420s \ --target-host root@192.168.0.185 --verbose --show-trace --impure

Then the original purpose was achieved.

This may be an issue with upstream nix