os/hosts/frikandel/networking.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
700 B
Nix
Raw Normal View History

2023-10-24 13:54:04 +00:00
{
flake,
config,
pkgs,
lib,
...
}: {
networking.hostName = "frikandel";
networking.hostId = "44234773";
networking.nameservers = [ "9.9.9.9" ];
2023-10-24 15:56:14 +00:00
services.openssh.openFirewall = true;
2023-10-24 13:54:04 +00:00
# Network configuration (Hetzner uses static IP assignments, and we don't use DHCP here)
networking.useDHCP = false;
networking.interfaces.enp1s0 = {
ipv4.addresses = [{ address = "128.140.109.213"; prefixLength = 32; }];
ipv6.addresses = [{ address = "2a01:4f8:c2c:b60::"; prefixLength = 64; }];
};
networking.defaultGateway = {
address = "172.31.1.1";
interface = "enp1s0";
};
networking.defaultGateway6 = {
address = "fe80::1";
interface = "enp1s0";
};
}