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

@ -1,7 +1,8 @@
{ config
, modulesPath
, pkgs
, ...
{
config,
modulesPath,
pkgs,
...
}:
{
imports = [
@ -30,7 +31,10 @@
fileSystems."/swap" = {
device = "/dev/sda1";
fsType = "btrfs";
options = [ "subvol=/root/swap" "noatime" ];
options = [
"subvol=/root/swap"
"noatime"
];
};
#swapDevices = [{
@ -49,7 +53,14 @@
networking.hostName = "agares";
networking.domain = "bs.dadada.li";
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"ehci_pci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
# Use the GRUB 2 boot loader.

View file

@ -66,7 +66,10 @@
];
stub-zone =
let
stubZone = name: addrs: { name = "${name}"; stub-addr = addrs; };
stubZone = name: addrs: {
name = "${name}";
stub-addr = addrs;
};
in
[
#(stubZone "li.dadada.bs" ["192.168.128.220" "2a01:4f8:c010:a710::1"])

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";
};
}
];
};

View file

@ -1,4 +1,9 @@
{ pkgs, lib, config, ... }:
{
pkgs,
lib,
config,
...
}:
let
secretsPath = config.dadada.secrets.path;
in