diff --git a/machines/hephaestus/configuration.nix b/machines/hephaestus/configuration.nix index fddae6f..412dbb9 100644 --- a/machines/hephaestus/configuration.nix +++ b/machines/hephaestus/configuration.nix @@ -7,13 +7,15 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "hephaestus"; # Define your hostname. + networking.hostName = "hephaestus"; - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. - networking.useDHCP = false; - networking.interfaces.enp34s0.useDHCP = true; + networking = { + interfaces.enp34s0 = { useDHCP = true; }; + defaultGateway = { + address = "192.168.0.1"; + interface = "enp34s0"; + }; + }; # Enable the OpenSSH server. services.sshd.enable = true; diff --git a/machines/hermes/configuration.nix b/machines/hermes/configuration.nix index 7eb9bb8..5deebf1 100644 --- a/machines/hermes/configuration.nix +++ b/machines/hermes/configuration.nix @@ -7,12 +7,8 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "hermes"; # Define your hostname. + networking.hostName = "hermes"; - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. - networking.useDHCP = false; networking.interfaces.wlp61s0.useDHCP = true; } diff --git a/main/networking.nix b/main/networking.nix index 3931fee..5da585c 100644 --- a/main/networking.nix +++ b/main/networking.nix @@ -3,9 +3,11 @@ { services.tailscale.enable = true; - networking.firewall = { - allowPing = false; - enable = true; - trustedInterfaces = [ "tailscale0" ]; + networking = { + firewall = { + allowPing = false; + enable = true; + trustedInterfaces = [ "tailscale0" ]; + }; }; }