From b05541933def8314368712dd1cff27449e8d6e58 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 29 Jun 2025 07:24:56 +0200 Subject: [PATCH] nixos/installer: enable networkmanager by default This is the easiest pick for new users to get their footing on NixOS. NetworKManager allows managing a wide variety of different network interface types interactively and with ease. It replaces `useDHCP` since its default profiles for Ethernet and WLAN come with DHCP enabled by default. --- .../installer/tools/nixos-generate-config.pl | 25 ------------------- nixos/modules/installer/tools/tools.nix | 6 ++--- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 1038fadec37d..80984c85ad5d 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -613,8 +613,6 @@ if (!$noFilesystems) { $fsAndSwap .= "swapDevices =" . multiLineList(" ", @swapDevices) . ";\n"; } -my $networkingDhcpConfig = generateNetworkingDhcpConfig(); - my $hwConfig = <.useDHCP`. - networking.useDHCP = lib.mkDefault true; -EOF - - foreach my $path (glob "/sys/class/net/*") { - my $dev = basename($path); - if ($dev ne "lo") { - $config .= " # networking.interfaces.$dev.useDHCP = lib.mkDefault true;\n"; - } - } - - return $config; -} - sub generateXserverConfig { my $xserverEnabled = "@xserverEnabled@"; @@ -737,8 +714,6 @@ EOF EOF } - my $networkingDhcpConfig = generateNetworkingDhcpConfig(); - my $xserverConfig = generateXserverConfig(); (my $desktopConfiguration = <