nix-community / nixos-images

Automatically build (netboot) images for NixOS [maintainer=@Mic92]
MIT License
187 stars 35 forks source link

nixos-unstable release doesn't include `nixos-install-tools` package #222

Closed azahi closed 3 months ago

azahi commented 3 months ago

To reproduce (as per documentation):

This doesn't allow running nixos-install.

curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
/root/kexec/run

This does:

curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-23.11/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
/root/kexec/run

Using nixos-anywhere on the nixos-unstable image fails with:

photo_2024-05-21_16-51-04

timhae commented 3 months ago

workaround: after nixos-anywhere errors out, you can ssh into the machine and nix-channel --update && nix-env --install nixos-install-tools, then re-run the nixos-anywhere command.

Jappie3 commented 3 months ago

posting this here as it was a pain to find without the error listed in text format:

### Installing NixOS ###
+ ssh_ sh
+ ssh -t -i /tmp/tmp.1bbrgRzWQJ/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@65.21.50.100 sh
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '65.21.50.100' (ED25519) to the list of known hosts.
+ export PATH=/run/wrappers/bin:/root/.nix-profile/bin:/nix/profile/bin:/root/.local/state/nix/profile/bin:/etc/profiles/per-user/root/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/run/current-system/sw/bin
+ PATH=/run/wrappers/bin:/root/.nix-profile/bin:/nix/profile/bin:/root/.local/state/nix/profile/bin:/etc/profiles/per-user/root/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/run/current-system/sw/bin
+ mkdir -p /mnt/tmp
+ chmod 777 /mnt/tmp
+ '[' n = y ']'
+ nixos-install --no-root-passwd --no-channel-copy --system /nix/store/4fc0dgv4vwirbp36nn7dbrbzahmlbp5l-nixos-system-Eidolon-24.05.20240521.5710852
sh: line 20: nixos-install: command not found
+ rm -rf /tmp/tmp.1bbrgRzWQJ
nixos-install: command not found