From 853ee2a9177d8f33e3bf8c3c380c3fad39bf8f98 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sun, 21 Jan 2024 14:01:57 +0100 Subject: [PATCH] hosts: server: switch runner to user networking --- modules/services/server/microvm.nix | 44 ++--------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/modules/services/server/microvm.nix b/modules/services/server/microvm.nix index 4201194..ef43d71 100644 --- a/modules/services/server/microvm.nix +++ b/modules/services/server/microvm.nix @@ -3,42 +3,6 @@ let name = "gitea-runner"; in { - systemd.network = { - enable = true; - netdevs."10-microvm".netdevConfig = { - Kind = "bridge"; - Name = "microvm"; - }; - networks = { - "10-microvm" = { - matchConfig.Name = "microvm"; - networkConfig = { - DHCP = "yes"; - IPv6AcceptRA = true; - }; - addresses = [ { - addressConfig.Address = "10.0.0.1/24"; - } { - addressConfig.Address = "fd12:3456:789a::1/64"; - } ]; - ipv6Prefixes = [ { - ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64"; - } ]; - }; - "11-microvm" = { - matchConfig.Name = "vm-*"; - networkConfig.Bridge = "microvm"; - }; - }; - }; - networking = { - nat = { - enable = true; - enableIPv6 = true; - externalInterface = "ens18"; - internalInterfaces = [ "microvm" ]; - }; - }; microvm = { autostart = [ @@ -125,20 +89,16 @@ in }; microvm = { - hypervisor = "cloud-hypervisor"; + hypervisor = "qemu"; vcpu = 4; mem = 4096; balloonMem = 4096; #kernel = pkgs.linuxKernel.packages.linux_latest; interfaces = [ { - type = "macvtap"; + type = "user"; id = "vm-${name}"; mac = "04:00:00:00:00:01"; - macvtap = { - link = "ens18"; - mode = "bridge"; - }; } ]; shares = [{ source = "/nix/store";