leoncloud: remove manual network config
This commit is contained in:
parent
f6dc5459f1
commit
c7bd7a84be
|
@ -16,63 +16,13 @@ in
|
||||||
c3d2.deployment = {
|
c3d2.deployment = {
|
||||||
server = "server9";
|
server = "server9";
|
||||||
mounts = [ "etc" "home" "var"];
|
mounts = [ "etc" "home" "var"];
|
||||||
autoNetSetup = false;
|
autoNetSetup = true;
|
||||||
};
|
};
|
||||||
microvm.interfaces = [ {
|
|
||||||
type = "tap";
|
|
||||||
id = "pub-leoncloud";
|
|
||||||
mac = mac.pub;
|
|
||||||
} {
|
|
||||||
type = "tap";
|
|
||||||
id = "serv-leoncloud";
|
|
||||||
mac = mac.serv;
|
|
||||||
} ];
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "leoncloud";
|
hostName = "leoncloud";
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
};
|
};
|
||||||
systemd.network = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# On the serv network I have a static IPv4 and only a route to the
|
|
||||||
# rest of the network so that I am reachable by
|
|
||||||
# public-access-proxy.
|
|
||||||
|
|
||||||
links."00-serv" = {
|
|
||||||
matchConfig.MACAddress = mac.serv;
|
|
||||||
linkConfig.Name = "serv";
|
|
||||||
};
|
|
||||||
|
|
||||||
networks."00-serv" = {
|
|
||||||
matchConfig.MACAddress = mac.serv;
|
|
||||||
networkConfig.IPv6AcceptRA = false;
|
|
||||||
# try harder disabling global ipv6
|
|
||||||
networkConfig.LinkLocalAddressing = "no";
|
|
||||||
addresses = [ {
|
|
||||||
addressConfig.Address = "${config.c3d2.hosts.${config.networking.hostName}.ip4}/${toString zentralwerk.lib.config.site.net.serv.subnet4Len}";
|
|
||||||
} ];
|
|
||||||
routes = [ {
|
|
||||||
routeConfig = {
|
|
||||||
Destination = "172.20.0.0/14";
|
|
||||||
Gateway = config.c3d2.hosts.serv-gw.ip4;
|
|
||||||
};
|
|
||||||
} ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# On the pub network I am a normal client.
|
|
||||||
|
|
||||||
links."00-pub" = {
|
|
||||||
matchConfig.MACAddress = mac.pub;
|
|
||||||
linkConfig.Name = "pub";
|
|
||||||
};
|
|
||||||
|
|
||||||
networks."01-pub" = {
|
|
||||||
matchConfig.MACAddress = mac.pub;
|
|
||||||
networkConfig.DHCP = "ipv4";
|
|
||||||
networkConfig.IPv6AcceptRA = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
security.sudo = {
|
security.sudo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user