[microvm] fix use of same macaddr

This commit is contained in:
2024-12-17 16:24:34 +01:00
parent 074ad306ac
commit 79082a5e4e

View File

@@ -41,7 +41,7 @@ let
];
defaultModules = baseModules;
makeMicroVM = hostName: ipv4Addr: modules: [
makeMicroVM = hostName: ipv4Addr: macAddr: modules: [
inputs.microvm.nixosModules.microvm
{
microvm = {
@@ -75,7 +75,7 @@ let
{
type = "tap";
id = "vm-${hostName}";
mac = "02:00:00:00:00:01";
mac = "${macAddr}";
}
];
};
@@ -127,7 +127,7 @@ in
system = "x86_64-linux";
specialArgs.inputs = inputs;
specialArgs.self = self;
modules = makeMicroVM "durruti" "10.0.0.5" [
modules = makeMicroVM "durruti" "10.0.0.5" "13:12:AC:AB:23:00" [
./durruti/configuration.nix
];
};
@@ -136,7 +136,7 @@ in
system = "x86_64-linux";
specialArgs.inputs = inputs;
specialArgs.self = self;
modules = makeMicroVM "vpn" "10.0.0.10" [
modules = makeMicroVM "vpn" "10.0.0.10" "13:12:AC:AB:23:01" [
self.nixosModules.malobeo
./vpn/configuration.nix
];