nix-config/hosts/cloud/networking.nix

35 lines
728 B
Nix
Raw Normal View History

2025-01-02 18:23:46 +00:00
{ lib, ... }: {
2025-01-04 18:24:41 +00:00
networking.dhcpcd.enable = false;
networking.useNetworkd = true;
systemd.network.enable = true;
systemd.network = {
networks."30-uplink" = {
matchConfig.Name="enp1s0";
networkConfig = {
Address = [
"188.245.196.27/32"
"2a01:4f8:c17:7f8a::1/64"
2025-01-02 18:23:46 +00:00
];
2025-01-04 18:24:41 +00:00
DNS = [
"2a01:4ff:ff00::add:1"
"2a01:4ff:ff00::add:2"
"185.12.64.1"
2025-01-02 18:23:46 +00:00
];
};
2025-01-04 18:24:41 +00:00
routes = [
{
Gateway = "172.31.1.1";
GatewayOnLink = true;
Destination = "0.0.0.0/0";
}
{
Gateway = "fe80::1";
GatewayOnLink = true;
Destination = "::/0";
}
];
2025-01-02 18:23:46 +00:00
};
};
}