From 5ee383ea8c31cd7c8489c2b076aac9c51f63b55c Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 24 Sep 2019 11:41:12 +0200 Subject: [PATCH] nixos-generate-config: add useDHCP per interface This sets networking.useDHCP to false and for all interfaces found the per-interface useDHCP to true. This replicates the current default behaviour and prepares for the switch to networkd. --- .../installer/tools/nixos-generate-config.pl | 20 +++++++++++++++++++ nixos/modules/installer/tools/tools.nix | 1 + 2 files changed, 21 insertions(+) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index cfdbdaabf5c..f2ffe61c42c 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -563,6 +563,24 @@ $fsAndSwap ${\join "", (map { " $_\n" } (uniq @attrs))}} EOF +sub generateNetworkingDhcpConfig { + my $config = <