chore: reformat

This commit is contained in:
Tim Schubert 2025-06-03 20:04:44 +02:00
parent b638c4125b
commit 1402ee13cc
No known key found for this signature in database
57 changed files with 845 additions and 466 deletions

View file

@ -10,7 +10,10 @@ in
enable = true;
links = {
"10-persistent" = {
matchConfig.OriginalName = [ "enp1s0" "enp2s0" ]; # takes search domains from the [Network]
matchConfig.OriginalName = [
"enp1s0"
"enp2s0"
]; # takes search domains from the [Network]
linkConfig.MACAddressPolicy = "persistent";
};
};
@ -49,19 +52,21 @@ in
PrivateKeyFile = config.age.secrets."wg-privkey-vpn-dadada-li".path;
ListenPort = 51234;
};
wireguardPeers = [{
wireguardPeerConfig =
let
peerAddresses = i: [
"${ipv4Prefix}.120.${i}/32"
"${ulaPrefix}:120::${i}/128"
];
in
{
PublicKey = "0eWP1hzkyoXlrjPSOq+6Y1u8tnFH+SejBJs8f8lf+iU=";
AllowedIPs = peerAddresses "3";
};
}];
wireguardPeers = [
{
wireguardPeerConfig =
let
peerAddresses = i: [
"${ipv4Prefix}.120.${i}/32"
"${ulaPrefix}:120::${i}/128"
];
in
{
PublicKey = "0eWP1hzkyoXlrjPSOq+6Y1u8tnFH+SejBJs8f8lf+iU=";
AllowedIPs = peerAddresses "3";
};
}
];
};
"20-wg0" = {
netdevConfig = {
@ -137,7 +142,10 @@ in
"10-mgmt" = lib.mkMerge [
(subnet "enp1s0" "100")
{
networkConfig.VLAN = [ "lan.10" "ff.11" ];
networkConfig.VLAN = [
"lan.10"
"ff.11"
];
dhcpServerStaticLeases = [
{
# legion
@ -158,13 +166,24 @@ in
];
"30-wg0" = {
matchConfig.Name = "wg0";
address = [ "10.3.3.2/32" "fd42:9c3b:f96d:121::2/128" ];
address = [
"10.3.3.2/32"
"fd42:9c3b:f96d:121::2/128"
];
DHCP = "no";
networkConfig.IPv6AcceptRA = false;
linkConfig.RequiredForOnline = false;
routes = [
{ routeConfig = { Destination = "10.3.3.1/24"; }; }
{ routeConfig = { Destination = "fd42:9c3b:f96d:121::1/64"; }; }
{
routeConfig = {
Destination = "10.3.3.1/24";
};
}
{
routeConfig = {
Destination = "fd42:9c3b:f96d:121::1/64";
};
}
];
};
"30-lan" = subnet "lan.10" "101" // {
@ -266,10 +285,14 @@ in
linkConfig.RequiredForOnline = false;
routes = [
{
routeConfig = { Destination = "${ipv4Prefix}.120.1/24"; };
routeConfig = {
Destination = "${ipv4Prefix}.120.1/24";
};
}
{
routeConfig = { Destination = "${ulaPrefix}::120:1/64"; };
routeConfig = {
Destination = "${ulaPrefix}::120:1/64";
};
}
];
};