From 3ecc50fb63c6d460d3693ec8fb24cf9a15ed2fa7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 14 Jul 2023 21:55:25 +0200 Subject: l: use networkd everywhere --- lass/2configs/default.nix | 1 + lass/2configs/networkd.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 lass/2configs/networkd.nix diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index 3d7188dc6..72dbfc480 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -12,6 +12,7 @@ with import ; ./wiregrill.nix ./tmux.nix ./tor-ssh.nix + ./networkd.nix { users.extraUsers = mapAttrs (_: h: { hashedPassword = h; }) diff --git a/lass/2configs/networkd.nix b/lass/2configs/networkd.nix new file mode 100644 index 000000000..12ffe0bd7 --- /dev/null +++ b/lass/2configs/networkd.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: +{ + systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; + systemd.services.systemd-networkd.stopIfChanged = false; + # Services that are only restarted might be not able to resolve when resolved is stopped before + systemd.services.systemd-resolved.stopIfChanged = false; + + networking.useNetworkd = true; + systemd.network = { + enable = true; + networks.wl0 = { + matchConfig.Name = "wl0"; + DHCP = "yes"; + networkConfig = { + IgnoreCarrierLoss = "3s"; + }; + dhcpV4Config.UseDNS = true; + }; + }; +} -- cgit v1.2.3