From a3576e284b12bb0cc3080078a528506ec59ac413 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sun, 15 Jan 2023 22:48:29 +0100 Subject: use systemd-networkd --- common.nix | 18 +++++++++--------- kuro/hardware-configuration.nix | 10 ++-------- liku/hardware-configuration.nix | 9 ++------- neko/hardware-configuration.nix | 9 ++------- 4 files changed, 15 insertions(+), 31 deletions(-) diff --git a/common.nix b/common.nix index 3fad042..ab37b13 100644 --- a/common.nix +++ b/common.nix @@ -90,10 +90,15 @@ in ]; }; - # - # we let the FRITZ!Box do the job - # - networking.useDHCP = true; + # allow all firmware + hardware.enableAllFirmware = true; + + # use systemd-networkd + networking.useDHCP = false; + networking.useNetworkd = true; + + # ensure firewall is up + networking.firewall.enable = true; # swap to RAM zramSwap.enable = true; @@ -268,11 +273,6 @@ in services.avahi.enable = true; services.avahi.nssmdns = true; - # ensure firewall is up - networking.firewall = { - enable = true; - }; - # let's get SSD status services.smartd.enable = true; diff --git a/kuro/hardware-configuration.nix b/kuro/hardware-configuration.nix index 3eb66db..75d271e 100644 --- a/kuro/hardware-configuration.nix +++ b/kuro/hardware-configuration.nix @@ -20,14 +20,8 @@ swapDevices = [ ]; - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + # Enables DHCP on the right ethernet interface. + networking.interfaces.enp1s0.useDHCP = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/liku/hardware-configuration.nix b/liku/hardware-configuration.nix index 6e4bccd..b5c78cb 100644 --- a/liku/hardware-configuration.nix +++ b/liku/hardware-configuration.nix @@ -25,13 +25,8 @@ swapDevices = [ ]; - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s20f0u6u3.useDHCP = lib.mkDefault true; - # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # Enables DHCP on the right ethernet interface. + networking.interfaces.enp3s0.useDHCP = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/neko/hardware-configuration.nix b/neko/hardware-configuration.nix index 4665392..d0d385a 100644 --- a/neko/hardware-configuration.nix +++ b/neko/hardware-configuration.nix @@ -25,13 +25,8 @@ swapDevices = [ ]; - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s20f0u4u3.useDHCP = lib.mkDefault true; - # networking.interfaces.enp8s0.useDHCP = lib.mkDefault true; + # Enables DHCP on the right ethernet interface. + networking.interfaces.enp8s0.useDHCP = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -- cgit v1.2.3