Merge pull request #85620 from matthewbauer/use-modulesPath-for-nixos-generate-config
nixos/nixos-generate-config.pl: use modulesPath instead of <nixpkgs>
This commit is contained in:
commit
f76d7b5e41
|
@ -180,7 +180,7 @@ sub pciCheck {
|
||||||
) )
|
) )
|
||||||
{
|
{
|
||||||
# we need e.g. brcmfmac43602-pcie.bin
|
# we need e.g. brcmfmac43602-pcie.bin
|
||||||
push @imports, "<nixpkgs/nixos/modules/hardware/network/broadcom-43xx.nix>";
|
push @imports, "(modulesPath + \"/hardware/network/broadcom-43xx.nix\")";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Can't rely on $module here, since the module may not be loaded
|
# Can't rely on $module here, since the module may not be loaded
|
||||||
|
@ -279,7 +279,7 @@ if ($virt eq "oracle") {
|
||||||
|
|
||||||
# Likewise for QEMU.
|
# Likewise for QEMU.
|
||||||
if ($virt eq "qemu" || $virt eq "kvm" || $virt eq "bochs") {
|
if ($virt eq "qemu" || $virt eq "kvm" || $virt eq "bochs") {
|
||||||
push @imports, "<nixpkgs/nixos/modules/profiles/qemu-guest.nix>";
|
push @imports, "(modulesPath + \"/profiles/qemu-guest.nix\")";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Also for Hyper-V.
|
# Also for Hyper-V.
|
||||||
|
@ -296,7 +296,7 @@ if ($virt eq "systemd-nspawn") {
|
||||||
|
|
||||||
# Provide firmware for devices that are not detected by this script,
|
# Provide firmware for devices that are not detected by this script,
|
||||||
# unless we're in a VM/container.
|
# unless we're in a VM/container.
|
||||||
push @imports, "<nixpkgs/nixos/modules/installer/scan/not-detected.nix>"
|
push @imports, "(modulesPath + \"/installer/scan/not-detected.nix\")"
|
||||||
if $virt eq "none";
|
if $virt eq "none";
|
||||||
|
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ my $hwConfig = <<EOF;
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =${\multiLineList(" ", @imports)};
|
imports =${\multiLineList(" ", @imports)};
|
||||||
|
|
Loading…
Reference in New Issue