From b851c0fed3e036248c508954459da41bfa2f397d Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 2 Sep 2024 09:07:39 -0700 Subject: [PATCH] [z790prors] Use static networking This should significantly speeds up boot time in userspace --- machines/z790prors/configuration.nix | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/machines/z790prors/configuration.nix b/machines/z790prors/configuration.nix index d216fbd..41b2e9f 100644 --- a/machines/z790prors/configuration.nix +++ b/machines/z790prors/configuration.nix @@ -22,17 +22,27 @@ in boot.loader.efi.canTouchEfiVariables = true; boot.loader.grub.useOSProber = true; - networking.hostName = "z790prors-nix"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Set your time zone. time.timeZone = "America/Los_Angeles"; - # 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.enp3s0.useDHCP = true; + networking = { + hostName = "z790prors-nix"; # Define your hostname. + domain = "oglehome"; + defaultGateway = "10.0.0.1"; + nameservers = [ "10.0.0.1" ]; + + # 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. + useDHCP = false; + + interfaces.enp3s0.ipv4.addresses = [{ + address = "10.0.0.37"; + prefixLength = 24; + }]; + }; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/";