diff --git a/sources/nixos-http.go b/sources/nixos-http.go index 0ad3fbb8..e9b07a95 100644 --- a/sources/nixos-http.go +++ b/sources/nixos-http.go @@ -12,7 +12,13 @@ type nixos struct { } func (s *nixos) Run() error { - tarballURL := fmt.Sprintf("https://hydra.nixos.org/job/nixos/trunk-combined/nixos.lxdContainerImage.%s-linux/latest/download-by-type/file/system-tarball", s.definition.Image.ArchitectureMapped) + hydraRelease := fmt.Sprintf("release-%s", s.definition.Image.Release) + + if s.definition.Image.Release == "unstable" { + hydraRelease = "trunk-combined" + } + + tarballURL := fmt.Sprintf("https://hydra.nixos.org/job/nixos/%s/nixos.lxdContainerImage.%s-linux/latest/download-by-type/file/system-tarball", hydraRelease, s.definition.Image.ArchitectureMapped) fpath, err := s.DownloadHash(s.definition.Image, tarballURL, "", nil) if err != nil {