From c304cad47cda98245d18a984cf01eeba7c9e1bc0 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Thu, 28 Nov 2024 23:14:27 +0100 Subject: [PATCH] base: disable dhcp globally --- modules/base/network.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/base/network.nix b/modules/base/network.nix index b14b6a7..5de5f2d 100644 --- a/modules/base/network.nix +++ b/modules/base/network.nix @@ -22,6 +22,10 @@ networking.useNetworkd = true; systemd.network.enable = true; + # Never use DHCP. Servers are configured with static addresses. On desktops, + # the NixOS network-manager module disables this option too. + networking.useDHCP = false; + # The notion of "online" is a broken concept # https://github.com/nix-community/srvos/blob/main/nixos/common/networking.nix systemd.services.NetworkManager-wait-online.enable = false;