hackens-org-configurations/machines/hackens-org/_networking.nix

45 lines
947 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 = "enp1s0";
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"
];
}