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 https://www.qubes-os.org/doc/building-non-fedora-template/)

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!

1 Like

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:

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

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