diff --git a/hosts/alpha/hardware.nix b/hosts/alpha/hardware.nix index c7b8c9c..d3b2dca 100644 --- a/hosts/alpha/hardware.nix +++ b/hosts/alpha/hardware.nix @@ -39,8 +39,5 @@ } ]; - # Enables DHCP on all ethernet and wireless LAN interfaces. - networking.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/hosts/alpha/network.nix b/hosts/alpha/network.nix index f7bcc9e..475b37d 100644 --- a/hosts/alpha/network.nix +++ b/hosts/alpha/network.nix @@ -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";};} ]; };