feat: upstream node generation
This commit is contained in:
parent
f1a3f0303b
commit
93b08971cf
9 changed files with 268 additions and 48 deletions
|
@ -1,12 +1,14 @@
|
|||
_guestName: guestCfg: {lib, ...}: let
|
||||
inherit
|
||||
(lib)
|
||||
_guestName: guestCfg:
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkForce
|
||||
nameValuePair
|
||||
listToAttrs
|
||||
flip
|
||||
;
|
||||
in {
|
||||
in
|
||||
{
|
||||
node.name = guestCfg.nodeName;
|
||||
node.type = guestCfg.backend;
|
||||
|
||||
|
@ -20,20 +22,20 @@ in {
|
|||
systemd.network.networks = listToAttrs (
|
||||
flip map guestCfg.networking.links (
|
||||
name:
|
||||
nameValuePair "10-${name}" {
|
||||
matchConfig.Name = name;
|
||||
DHCP = "yes";
|
||||
# XXX: Do we really want this?
|
||||
dhcpV4Config.UseDNS = false;
|
||||
dhcpV6Config.UseDNS = false;
|
||||
ipv6AcceptRAConfig.UseDNS = false;
|
||||
networkConfig = {
|
||||
IPv6PrivacyExtensions = "yes";
|
||||
MulticastDNS = true;
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
}
|
||||
nameValuePair "10-${name}" {
|
||||
matchConfig.Name = name;
|
||||
DHCP = "yes";
|
||||
# XXX: Do we really want this?
|
||||
dhcpV4Config.UseDNS = false;
|
||||
dhcpV6Config.UseDNS = false;
|
||||
ipv6AcceptRAConfig.UseDNS = false;
|
||||
networkConfig = {
|
||||
IPv6PrivacyExtensions = "yes";
|
||||
MulticastDNS = true;
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue