How to download latest nixos iso?

I am trying to build a bash script that automatically downloads the latest stable nixos iso.
I am trying to build a qubesOS builder for NixOS (see Redirecting…)

I am working on the 00_prepare.sh script.
I am hoping I can do something like:

BOOTSTRAP_TARBALL=$(wget -qO- "$ARCHLINUX_SRC_PREFIX"/iso/latest/sha1sums.txt | grep -o "archlinux-bootstrap-[0-9.]*-x86_64.tar.gz")

Except obviously it would be a iso format. If it could be a tarball that would be great too.

Thanks in advance!

2 Likes

If you’re okay with unstable, you can use this URL:

Unfortunately we don’t really have a “nixos-stable”. It has been requested before, but I can’t find the ticket right now. If you know which NixOS version you want, you can do something like this:

1 Like

URLs like nixos-19.03 release nixos-19.03.173691.34c7eb7545d might be useful to you, though probably not as easily as you’d hope. EDIT: the final slash was breaking the link :slight_smile:

1 Like

Hey, I have been considering trying to tackle this exact same project lately as well… Are you sharing your attempt publically at all?

1 Like

Thanks! I’ll try making this work.

1 Like

No clue what you’re trying to achieve but this https://github.com/cleverca22/nixos-configs/blob/36c6dfb5ce0e48ea7f24ad6602cb1203fa44e41c/multi-boot-helper.nix lets you generate an installation image and the upside is you choose which version of nixos you want by modifying the top import.

1 Like

https://github.com/robcohen/qubes-builder-nixos I believe

1 Like