alpha: static ipv4 configuration

This commit is contained in:
Casper V. Kristensen 2024-03-31 03:56:59 +02:00
parent 830dd4c72a
commit 67dfb365b8
2 changed files with 9 additions and 4 deletions

View file

@ -39,8 +39,5 @@
}
];
# Enables DHCP on all ethernet and wireless LAN interfaces.
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View file

@ -5,13 +5,21 @@
}: {
systemd.network = {
# Main interface
# https://nixos.wiki/wiki/Install_NixOS_on_Hetzner_Cloud
networks."10-lan" = {
name = "enp1s0";
networkConfig.DHCP = "ipv4";
address = [
"116.203.179.206/32"
"2a01:4f8:c2c:71c0::/64"
];
routes = [
{routeConfig = {Destination = "172.31.1.1";};}
{
routeConfig = {
Gateway = "172.31.1.1";
GatewayOnLink = true;
};
}
{routeConfig = {Gateway = "fe80::1";};}
];
};