build-qemu.sh 742 B

123456789101112131415161718
  1. pushd `dirname $0`
  2. cd ..
  3. rm -rf ssh/hostident
  4. rm -rf ssh/generated ignition/ssh/generated.pub
  5. ssh-keygen -f ssh/generated -P ""
  6. nix --experimental-features 'nix-command flakes' build --cores 1 --show-trace .#packages.x86_64-linux.qcow2
  7. cp result/nixos.qcow2 ./nixos.qcow2
  8. chmod 0777 nixos.qcow2
  9. rm result
  10. echo "[theserver]" > scripts/rclone.conf
  11. echo "type = sftp" >> scripts/rclone.conf
  12. echo "host = localhost" >> scripts/rclone.conf
  13. echo "user = root" >> scripts/rclone.conf
  14. echo "key_pem = "$(awk '{printf "%s\\n", $0}' < ssh/generated) >> scripts/rclone.conf
  15. popd