hosts: server: switch runner to user networking
This commit is contained in:
parent
4a876f27d3
commit
853ee2a917
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user