From b4adac9ba985cd1741f48a3cec865f69a9442cda Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 20 Nov 2021 04:00:46 +0200 Subject: nixos/nixos-generate-config: move dhcpConfig from configuration.nix to hardware-configuration.nix --- nixos/doc/manual/from_md/release-notes/rl-2205.section.xml | 7 +++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 2 ++ nixos/modules/installer/tools/nixos-generate-config.pl | 7 +++++-- nixos/modules/installer/tools/tools.nix | 1 - 4 files changed, 14 insertions(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 0afeefa3b86d..ba6edb5f4302 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -773,6 +773,13 @@ loaded in the initrd. + + + nixos-generate-config now puts the dhcp + configuration in hardware-configuration.nix + instead of configuration.nix. + + fetchFromSourcehut now allows fetching diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 7813d4abd3ee..5bae1f067ed1 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -263,6 +263,8 @@ In addition to numerous new and upgraded packages, this release has the followin - A new option `boot.initrd.extraModprobeConfig` has been added which can be used to configure kernel modules that are loaded in the initrd. +- `nixos-generate-config` now puts the dhcp configuration in `hardware-configuration.nix` instead of `configuration.nix`. + - `fetchFromSourcehut` now allows fetching repositories recursively using `fetchgit` or `fetchhg` if the argument `fetchSubmodules` is set to `true`. diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 1220c1849d6a..57aef50a0f6b 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -558,6 +558,8 @@ if (!$noFilesystems) { $fsAndSwap .= "swapDevices =" . multiLineList(" ", @swapDevices) . ";\n"; } +my $networkingDhcpConfig = generateNetworkingDhcpConfig(); + my $hwConfig = <