mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user