Skip to content

Commit d15c5fe

Browse files
committed
Fix building with empty NIX_PATH
<nixpkgs> lookup was being used in all hardware-configuration.nix files. Turns out nixos-generate-config was fixed to not rely on <nixpkgs> lookup in master branch, ref c45295d47e91fef3fdb13ee11fc24ebff8ad7288 ("nixos/nixos-generate-config.pl: use modulesPath instead of <nixpkgs>"). This change manually fixes the hardware-configuration.nix files to match that change, allowing `NIX_PATH= nix-build` to succeed.
1 parent abc57f2 commit d15c5fe

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

machines/media/hardware-configuration.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Do not modify this file! It was generated by ‘nixos-generate-config’
22
# and may be overwritten by future invocations. Please make changes
33
# to /etc/nixos/configuration.nix instead.
4-
{ config, lib, pkgs, ... }:
4+
{ config, lib, pkgs, modulesPath, ... }:
55

66
{
77
imports =
8-
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
8+
[ (modulesPath + "/installer/scan/not-detected.nix")
99
];
1010

1111
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "bcache" ];

machines/mini/hardware-configuration.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This is a generated file. Do not modify!
22
# Make changes to /etc/nixos/configuration.nix instead.
3-
{ config, pkgs, ... }:
3+
{ config, pkgs, modulesPath, ... }:
44

55
{
66
require = [
7-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
7+
(modulesPath + "/installer/scan/not-detected.nix")
88
];
99

1010
boot.initrd.kernelModules = [ "xhci_hcd" "ehci_pci" "ahci" "usbhid" "usb_storage" ];

machines/srv1/hardware-configuration.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Do not modify this file! It was generated by ‘nixos-generate-config’
22
# and may be overwritten by future invocations. Please make changes
33
# to /etc/nixos/configuration.nix instead.
4-
{ config, lib, pkgs, ... }:
4+
{ config, lib, pkgs, modulesPath, ... }:
55

66
{
77
imports =
8-
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
8+
[ (modulesPath + "/installer/scan/not-detected.nix")
99
];
1010

1111
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "bcache" ];

0 commit comments

Comments
 (0)