mimir: Wait until tailscale has started

This commit is contained in:
Erwin Boskma 2024-09-18 16:16:19 +02:00
parent 5c89c01e47
commit 0aa4a160d7
Signed by: erwin
SSH key fingerprint: SHA256:OCinH/khuGY1LA9RG8YLM8GNH6C1DDXBdy3SNE+I5Hw

View file

@ -260,76 +260,85 @@
}; };
}; };
systemd.network = { systemd = {
enable = true; network = {
enable = true;
# wait-online.extraArgs = [ "--interface=enp4s0" ]; # wait-online.extraArgs = [ "--interface=enp4s0" ];
wait-online.anyInterface = true; wait-online.anyInterface = true;
links = { links = {
"40-enp4s0" = { "40-enp4s0" = {
matchConfig = { matchConfig = {
Name = "enp4s0"; Name = "enp4s0";
};
linkConfig = {
WakeOnLan = "magic";
};
}; };
linkConfig = { };
WakeOnLan = "magic";
netdevs = {
"10-microvm" = {
netdevConfig = {
Kind = "bridge";
Name = "microvm";
};
};
};
networks = {
"40-enp4s0" = {
enable = true;
DHCP = "yes";
domains = [
"internal.horus.nu"
"bedum.horus.nu"
];
dhcpV4Config = {
RouteMetric = 64;
};
matchConfig = {
Name = "enp4s0";
};
};
"40-enp5s0f1" = {
enable = true;
linkConfig = {
RequiredForOnline = "no";
};
matchConfig = {
Name = "enp5s0f1";
};
};
"10-microvm" = {
matchConfig = {
Name = "microvm";
};
addresses = [ { Address = "172.16.0.1/24"; } ];
};
"11-microvm" = {
matchConfig = {
Name = "vm-*";
};
networkConfig = {
Bridge = "microvm";
};
}; };
}; };
}; };
netdevs = { services = {
"10-microvm" = { ollama = {
netdevConfig = { after = [ "tailscaled.service" ];
Kind = "bridge"; preStart = "${pkgs.coreutils}/bin/sleep 10"; # Tailscale reports ready before getting an IP address
Name = "microvm";
};
};
};
networks = {
"40-enp4s0" = {
enable = true;
DHCP = "yes";
domains = [
"internal.horus.nu"
"bedum.horus.nu"
];
dhcpV4Config = {
RouteMetric = 64;
};
matchConfig = {
Name = "enp4s0";
};
};
"40-enp5s0f1" = {
enable = true;
linkConfig = {
RequiredForOnline = "no";
};
matchConfig = {
Name = "enp5s0f1";
};
};
"10-microvm" = {
matchConfig = {
Name = "microvm";
};
addresses = [ { Address = "172.16.0.1/24"; } ];
};
"11-microvm" = {
matchConfig = {
Name = "vm-*";
};
networkConfig = {
Bridge = "microvm";
};
}; };
}; };
}; };