From c45295d47e91fef3fdb13ee11fc24ebff8ad7288 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 20 Apr 2020 09:57:17 -0500 Subject: [PATCH] nixos/nixos-generate-config.pl: use modulesPath instead of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For imports, it is better to use ‘modulesPath’ than rely on being correctly set. Some users may not have set correctly. In addition, when ‘pure-eval=true’, is unset. --- nixos/modules/installer/tools/nixos-generate-config.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index a32c19a4eba9..422c405054d5 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -180,7 +180,7 @@ sub pciCheck { ) ) { # we need e.g. brcmfmac43602-pcie.bin - push @imports, ""; + push @imports, "(modulesPath + \"/hardware/network/broadcom-43xx.nix\")"; } # Can't rely on $module here, since the module may not be loaded @@ -279,7 +279,7 @@ if ($virt eq "oracle") { # Likewise for QEMU. if ($virt eq "qemu" || $virt eq "kvm" || $virt eq "bochs") { - push @imports, ""; + push @imports, "(modulesPath + \"/profiles/qemu-guest.nix\")"; } # Also for Hyper-V. @@ -296,7 +296,7 @@ if ($virt eq "systemd-nspawn") { # Provide firmware for devices that are not detected by this script, # unless we're in a VM/container. -push @imports, "" +push @imports, "(modulesPath + \"/installer/scan/not-detected.nix\")" if $virt eq "none"; @@ -549,7 +549,7 @@ my $hwConfig = <