diff --git a/hardware/lattepanda.nix b/hardware/lattepanda.nix index b9a230b..0239167 100644 --- a/hardware/lattepanda.nix +++ b/hardware/lattepanda.nix @@ -53,14 +53,6 @@ fsType = "vfat"; }; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/home-server/default.nix b/hosts/home-server/default.nix index 3080828..f3c7e0a 100644 --- a/hosts/home-server/default.nix +++ b/hosts/home-server/default.nix @@ -141,6 +141,7 @@ in boot.initrd.availableKernelModules = [ "igb" ]; boot.initrd.network = { enable = true; + udhcpc.enable = true; ssh = { enable = true; hostKeys = map (f: f.path) hostKeys; diff --git a/system/networking.nix b/system/networking.nix index 3c50fc7..8aa8c37 100644 --- a/system/networking.nix +++ b/system/networking.nix @@ -19,13 +19,12 @@ let }; in { + networking.useDHCP = lib.mkDefault true; + networking.nameservers = if isAdguardHost then nameservers.local else nameservers.remote; networking.nftables.enable = true; - networking.networkmanager = { - enable = true; - dns = "systemd-resolved"; - }; + networking.networkmanager.dns = "systemd-resolved"; systemd.network = { enable = true;