From f27b7199ff1aca1837bd97ab358f03bdded5a6ad Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 31 Dec 2024 02:15:59 +0100 Subject: Split default profile into a second, more specialized one Signed-off-by: Mel --- configuration/vm/incus.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/configuration/vm/incus.nix b/configuration/vm/incus.nix index 546c328..bd7813a 100644 --- a/configuration/vm/incus.nix +++ b/configuration/vm/incus.nix @@ -80,6 +80,28 @@ in # new instances without an explicitly set profile. { name = "default"; + config = { }; + devices = { + # this is the internal vm network, + # not the hosts. + eth0 = { + name = "eth0"; + network = "incusbr0"; + type = "nic"; + }; + root = { + path = "/"; + pool = "default"; + size = "5GiB"; + type = "disk"; + }; + }; + } + # this profile is the one we want to apply to the ubuntu example vm. + # it is provisioned with a static ipv4 (for nat-ted proxy) + # and cloud-init configuration + { + name = "vm-1"; # config applied to new instances, # this is how we can best control # vm provisioning semi-declaratively. @@ -100,6 +122,10 @@ in name = "eth0"; network = "incusbr0"; type = "nic"; + + # this is necessary for our nat proxy configuration. + # see: https://linuxcontainers.org/incus/docs/main/reference/devices_proxy/#nat-mode + "ipv4.address" = "10.0.100.123"; }; root = { path = "/"; -- cgit 1.4.1