From 28bf68098cfea3e247990acfc3f7d33ec9555c3c Mon Sep 17 00:00:00 2001 From: kalipso Date: Thu, 21 Nov 2024 15:25:57 +0100 Subject: [PATCH] [microvm] Fix conditionals within module finally i hope.... --- machines/modules/malobeo/microvm_host.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/machines/modules/malobeo/microvm_host.nix b/machines/modules/malobeo/microvm_host.nix index 7ff90ac4..0dbbafc5 100644 --- a/machines/modules/malobeo/microvm_host.nix +++ b/machines/modules/malobeo/microvm_host.nix @@ -29,8 +29,8 @@ in inputs.microvm.nixosModules.host ]; - config = { - systemd.network = mkIf cfg.enableHostBridge { + config = mkIf cfg.enableHostBridge { + systemd.network = { enable = true; # create a bride device that all the microvms will be connected to netdevs."10-microvm".netdevConfig = { @@ -54,16 +54,13 @@ in } ]; }; - } // mkIf (!hostEmpty) { - # connect the vms to the bridge networks."11-microvm" = { matchConfig.Name = "vm-*"; networkConfig.Bridge = "microvm"; }; - }; + }; - microvm.autostart = cfg.deployHosts; microvm.vms = let # Map the values to each hostname to then generate a Attrs using listToAttrs