From 5260309f4f5038a3caf9190d281f43b8fab7cd7a Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Sat, 25 Apr 2026 20:22:22 +0000 Subject: [PATCH] incus-vm: use local: remote for NixOS images, drop nixos/unstable option linuxcontainers.org (images: remote) does not carry NixOS. Images are imported locally and aliased (e.g. nixos/25.11). Use local: as the source remote when is_nixos, and images: for Ubuntu/other distros. Also removes the nixos/unstable option which has no corresponding locally-imported image. --- registry/bpmct/templates/incus-vm/main.tf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/registry/bpmct/templates/incus-vm/main.tf b/registry/bpmct/templates/incus-vm/main.tf index dfa895b2..02e0798c 100644 --- a/registry/bpmct/templates/incus-vm/main.tf +++ b/registry/bpmct/templates/incus-vm/main.tf @@ -75,11 +75,6 @@ data "coder_parameter" "image" { icon = "/icon/nix.svg" } - option { - name = "NixOS Unstable" - value = "nixos/unstable" - icon = "/icon/nix.svg" - } } data "coder_parameter" "cpu" { @@ -223,7 +218,9 @@ resource "coder_agent" "main" { resource "incus_image" "image" { remote = local.incus_remote source_image = { - remote = "images" + # NixOS images are imported locally (linuxcontainers.org doesn't carry NixOS). + # Ubuntu/other images are pulled from the public images: simplestreams remote. + remote = local.is_nixos ? "local" : "images" name = local.is_nixos ? data.coder_parameter.image.value : "${data.coder_parameter.image.value}/${data.coder_parameter.host.value == "ThinkStation" ? "amd64" : "arm64"}" type = "virtual-machine" architecture = data.coder_parameter.host.value == "ThinkStation" ? "x86_64" : "aarch64"