From 3c8bc3a9784c9118122e4f44d74fdfe45c42454f Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 27 Mar 2026 19:05:35 +0530 Subject: chore(os): use networkd --- os/cez/modules/headscale.nix | 1 - os/common/configuration.nix | 1 + os/pc/modules/network.nix | 29 ++++++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/os/cez/modules/headscale.nix b/os/cez/modules/headscale.nix index 169ed45..4c9f6fd 100644 --- a/os/cez/modules/headscale.nix +++ b/os/cez/modules/headscale.nix @@ -37,7 +37,6 @@ in services.tailscale = { enable = true; - interfaceName = "headscale"; openFirewall = true; authKeyFile = config.sops.secrets."misc/headscale".path; diff --git a/os/common/configuration.nix b/os/common/configuration.nix index f4f3093..d1ea0e5 100644 --- a/os/common/configuration.nix +++ b/os/common/configuration.nix @@ -27,6 +27,7 @@ in useDHCP = false; hostName = lib.mkOptionDefault "common"; }; + systemd.network.enable = true; zramSwap.enable = true; swapDevices = lib.mkDefault [ diff --git a/os/pc/modules/network.nix b/os/pc/modules/network.nix index eeb5b0e..8841547 100644 --- a/os/pc/modules/network.nix +++ b/os/pc/modules/network.nix @@ -1,7 +1,30 @@ -{ ... }: { - networking.wireless.iwd = { + networking.wireless.iwd.enable = true; + + systemd.network = { enable = true; - settings.General.EnableNetworkConfiguration = true; + networks = { + "99-wireless-dhcp" = { + matchConfig.Type = "wlan"; + networkConfig.DHCP = "yes"; + dhcpV4Config = { + UseHostname = "no"; + UseDNS = "no"; + }; + dhcpV6Config.UseDNS = "no"; + }; + "99-wired-dhcp" = { + matchConfig = { + Kind = "!*"; + Type = "ether"; + }; + networkConfig.DHCP = "yes"; + dhcpV4Config = { + UseHostname = "no"; + UseDNS = "no"; + }; + dhcpV6Config.UseDNS = "no"; + }; + }; }; } -- cgit v1.2.3