hackens-org-configurations/machines/hackens-org/_networking.nix
2024-01-12 18:07:38 +01:00

42 lines
942 B
Nix

{ pkgs, ... }:
{
imports = [
./wireguard.nix
];
networking.useDHCP = false;
systemd.network = {
enable = true;
netdevs."10-sit-he" = {
netdevConfig = {
Kind = "sit";
Name = "sit-he";
};
tunnelConfig = {
Local = "129.199.129.76";
Remote = "216.66.84.42";
};
};
networks = {
"10-uplink" = {
name = "eth0";
DHCP = "no";
address = [
"129.199.129.76/24"
];
networkConfig = {
Gateway = "129.199.129.1";
Tunnel = [ "sit-he" ];
};
};
"10-tun-he" = {
matchConfig.Name = "sit-he";
networkConfig = {
Gateway = [ "2001:470:1f12:d21::1" ];
Description = "HE.NET IPv6 Tunnel (owned by maurice)";
Address = [ "2001:470:1f12:d21::2/64" ];
};
};
};
};
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
}