nixos/incus-image: disable cloneConfig module

The cloneConfig module can prevent the incus-create-nixos-config.service from
running because it will already have generated a configuration.nix.

Also modifies the test to hopefully catch that.

Fixes 0f363a1cb4
This commit is contained in:
Tom Herbers
2026-05-06 01:55:43 +02:00
parent 549bd84d62
commit e09f967bc3
3 changed files with 7 additions and 0 deletions

View File

@@ -32,6 +32,9 @@
};
};
# Disable the cloneConfig module. We have our own Service to generate a configuration.nix.
installer.cloneConfig = false;
networking = {
dhcpcd.enable = false;
useDHCP = false;

View File

@@ -32,6 +32,9 @@
};
};
# Disable the cloneConfig module. We have our own Service to generate a configuration.nix.
installer.cloneConfig = false;
# Network
networking = {
dhcpcd.enable = false;

View File

@@ -164,6 +164,7 @@ in
with subtest("[${image_id}] default configuration.nix is created on first boot"):
server.succeed(f"incus exec {instance_name} -- test -f /etc/nixos/configuration.nix")
server.succeed(f"incus exec {instance_name} -- grep -q 'default incus configuration' /etc/nixos/configuration.nix")
with subtest("[${image_id}] configuration.nix create service does not overwrite existing config"):
server.succeed(f"incus exec {instance_name} -- systemctl restart incus-create-nixos-config.service")