secrets: rekey
This commit is contained in:
parent
21add79ffa
commit
972f729438
26 changed files with 218 additions and 215 deletions
|
@ -74,163 +74,164 @@ in
|
|||
}];
|
||||
};
|
||||
};
|
||||
networks = let
|
||||
subnet = name: subnetId: {
|
||||
matchConfig.Name = name;
|
||||
addresses = [
|
||||
{ addressConfig.Address = "${ipv4Prefix}.${subnetId}.1/24"; }
|
||||
{ addressConfig.Address = "${ulaPrefix}:${subnetId}::1/64"; }
|
||||
];
|
||||
dhcpPrefixDelegationConfig = {
|
||||
SubnetId = "0x${subnetId}";
|
||||
networks =
|
||||
let
|
||||
subnet = name: subnetId: {
|
||||
matchConfig.Name = name;
|
||||
addresses = [
|
||||
{ addressConfig.Address = "${ipv4Prefix}.${subnetId}.1/24"; }
|
||||
{ addressConfig.Address = "${ulaPrefix}:${subnetId}::1/64"; }
|
||||
];
|
||||
dhcpPrefixDelegationConfig = {
|
||||
SubnetId = "auto";
|
||||
};
|
||||
ipv6Prefixes = [
|
||||
{
|
||||
ipv6PrefixConfig.Prefix = "${ulaPrefix}:${subnetId}::/64";
|
||||
}
|
||||
];
|
||||
dhcpServerConfig = {
|
||||
DNS = "${ipv4Prefix}.${subnetId}.1";
|
||||
NTP = "${ipv4Prefix}.${subnetId}.1";
|
||||
EmitDNS = true;
|
||||
EmitNTP = true;
|
||||
EmitRouter = true;
|
||||
PoolOffset = 100;
|
||||
PoolSize = 100;
|
||||
SendOption = "12:string:${domain}";
|
||||
};
|
||||
linkConfig = {
|
||||
RequiredForOnline = "no";
|
||||
};
|
||||
networkConfig = {
|
||||
Domains = domain;
|
||||
EmitLLDP = "yes";
|
||||
IPv6SendRA = true;
|
||||
IPv6AcceptRA = false;
|
||||
DHCPPrefixDelegation = true;
|
||||
DHCPServer = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
OverheadBytes = 38
|
||||
Bandwidth = 1G
|
||||
'';
|
||||
};
|
||||
ipv6Prefixes = [
|
||||
{
|
||||
ipv6PrefixConfig.Prefix = "${ulaPrefix}:${subnetId}::/64";
|
||||
}
|
||||
];
|
||||
dhcpServerConfig = {
|
||||
DNS = "${ipv4Prefix}.${subnetId}.1";
|
||||
NTP = "${ipv4Prefix}.${subnetId}.1";
|
||||
EmitDNS = true;
|
||||
EmitNTP = true;
|
||||
EmitRouter = true;
|
||||
PoolOffset = 100;
|
||||
PoolSize = 100;
|
||||
SendOption = "12:string:${domain}";
|
||||
in
|
||||
{
|
||||
"10-mgmt" = subnet "enp1s0" "100" // {
|
||||
networkConfig.VLAN = [ "lan.10" "ff.11" "srv.13" ];
|
||||
dhcpServerStaticLeases = [
|
||||
{
|
||||
# legion
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.100.107";
|
||||
MACAddress = "80:CC:9C:95:4A:60";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
linkConfig = {
|
||||
RequiredForOnline = "no";
|
||||
"30-lan" = subnet "lan.10" "101" // {
|
||||
dhcpServerStaticLeases = [
|
||||
{
|
||||
# ninurta
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.101.184";
|
||||
MACAddress = "48:21:0B:3E:9C:FE";
|
||||
};
|
||||
}
|
||||
{
|
||||
# crocell
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.101.122";
|
||||
MACAddress = "9C:C9:EB:4F:3F:0E";
|
||||
};
|
||||
}
|
||||
{
|
||||
# gorgon
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.101.205";
|
||||
MACAddress = "8C:C6:81:6A:39:2F";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
networkConfig = {
|
||||
Domains = domain;
|
||||
EmitLLDP = "yes";
|
||||
IPv6SendRA = true;
|
||||
IPv6AcceptRA = false;
|
||||
DHCPPrefixDelegation = true;
|
||||
DHCPServer = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
OverheadBytes = 38
|
||||
Bandwidth = 1G
|
||||
'';
|
||||
};
|
||||
in {
|
||||
"10-mgmt" = subnet "enp1s0" "100" // {
|
||||
networkConfig.VLAN = [ "lan.10" "ff.11" "srv.13" ];
|
||||
dhcpServerStaticLeases = [
|
||||
{
|
||||
# legion
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.100.107";
|
||||
MACAddress = "80:CC:9C:95:4A:60";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
"30-lan" = subnet "lan.10" "101" // {
|
||||
dhcpServerStaticLeases = [
|
||||
{
|
||||
# ninurta
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.101.184";
|
||||
MACAddress = "48:21:0B:3E:9C:FE";
|
||||
};
|
||||
}
|
||||
{
|
||||
# crocell
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.101.122";
|
||||
MACAddress = "9C:C9:EB:4F:3F:0E";
|
||||
};
|
||||
}
|
||||
{
|
||||
# gorgon
|
||||
dhcpServerStaticLeaseConfig = {
|
||||
Address = "192.168.101.205";
|
||||
MACAddress = "8C:C6:81:6A:39:2F";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"30-ff" = subnet "ff.11" "102";
|
||||
"30-ff" = subnet "ff.11" "102";
|
||||
|
||||
"30-srv" = subnet "srv.13" "103";
|
||||
"30-srv" = subnet "srv.13" "103";
|
||||
|
||||
"30-ifb4ppp0" = {
|
||||
name = "ifb4ppp0";
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
OverheadBytes = 65
|
||||
Bandwidth = 95M
|
||||
FlowIsolationMode = triple
|
||||
'';
|
||||
};
|
||||
"30-ifb4ppp0" = {
|
||||
name = "ifb4ppp0";
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
OverheadBytes = 65
|
||||
Bandwidth = 95M
|
||||
FlowIsolationMode = triple
|
||||
'';
|
||||
};
|
||||
|
||||
# TODO does not work
|
||||
"30-ppp0" = {
|
||||
name = "ppp*";
|
||||
linkConfig = {
|
||||
RequiredForOnline = "routable";
|
||||
"30-ppp0" = {
|
||||
name = "ppp*";
|
||||
linkConfig = {
|
||||
RequiredForOnline = "routable";
|
||||
};
|
||||
networkConfig = {
|
||||
KeepConfiguration = "static";
|
||||
DefaultRouteOnDevice = true;
|
||||
LinkLocalAddressing = "ipv6";
|
||||
DHCP = "ipv6";
|
||||
};
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
OverheadBytes = 65
|
||||
Bandwidth = 36M
|
||||
FlowIsolationMode = triple
|
||||
[DHCPv6]
|
||||
PrefixDelegationHint= ::/56
|
||||
UseAddress = false
|
||||
UseDelegatedPrefix = true
|
||||
WithoutRA = solicit
|
||||
[DHCPPrefixDelegation]
|
||||
UplinkInterface=:self
|
||||
'';
|
||||
ipv6SendRAConfig = {
|
||||
# Let networkd know that we would very much like to use DHCPv6
|
||||
# to obtain the "managed" information. Not sure why they can't
|
||||
# just take that from the upstream RAs.
|
||||
Managed = true;
|
||||
};
|
||||
};
|
||||
networkConfig = {
|
||||
KeepConfiguration = "static";
|
||||
DefaultRouteOnDevice = true;
|
||||
LinkLocalAddressing = "ipv6";
|
||||
DHCP = "ipv6";
|
||||
# Talk to modem for management
|
||||
"enp2s0" = {
|
||||
name = "enp2s0";
|
||||
linkConfig = {
|
||||
RequiredForOnline = "no";
|
||||
};
|
||||
networkConfig = {
|
||||
Address = "192.168.1.254/24";
|
||||
EmitLLDP = "yes";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
OverheadBytes = 65
|
||||
Bandwidth = 36M
|
||||
FlowIsolationMode = triple
|
||||
[DHCPv6]
|
||||
PrefixDelegationHint= ::/56
|
||||
UseAddress = false
|
||||
UseDelegatedPrefix = true
|
||||
WithoutRA = solicit
|
||||
[DHCPPrefixDelegation]
|
||||
UplinkInterface=:self
|
||||
'';
|
||||
ipv6SendRAConfig = {
|
||||
# Let networkd know that we would very much like to use DHCPv6
|
||||
# to obtain the "managed" information. Not sure why they can't
|
||||
# just take that from the upstream RAs.
|
||||
Managed = true;
|
||||
"10-roadw" = {
|
||||
matchConfig.Name = "roadw";
|
||||
address = [
|
||||
"${ipv4Prefix}.120.1/32"
|
||||
"${ulaPrefix}:120::1/128"
|
||||
];
|
||||
DHCP = "no";
|
||||
networkConfig.IPv6AcceptRA = false;
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
routes = [
|
||||
{
|
||||
routeConfig = { Destination = "${ipv4Prefix}.120.1/24"; };
|
||||
}
|
||||
{
|
||||
routeConfig = { Destination = "${ulaPrefix}::120:1/64"; };
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
# Talk to modem for management
|
||||
"enp2s0" = {
|
||||
name = "enp2s0";
|
||||
linkConfig = {
|
||||
RequiredForOnline = "no";
|
||||
};
|
||||
networkConfig = {
|
||||
Address = "192.168.1.254/24";
|
||||
EmitLLDP = "yes";
|
||||
};
|
||||
};
|
||||
"10-roadw" = {
|
||||
matchConfig.Name = "roadw";
|
||||
address = [
|
||||
"${ipv4Prefix}.120.1/32"
|
||||
"${ulaPrefix}:120::1/128"
|
||||
];
|
||||
DHCP = "no";
|
||||
networkConfig.IPv6AcceptRA = false;
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
routes = [
|
||||
{
|
||||
routeConfig = { Destination = "${ipv4Prefix}.120.1/24"; };
|
||||
}
|
||||
{
|
||||
routeConfig = { Destination = "${ulaPrefix}::120:1/64"; };
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets."wg-privkey-vpn-dadada-li" = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue