diff --git a/modules/installer/cd-dvd/installation-cd-base.nix b/modules/installer/cd-dvd/installation-cd-base.nix index 2f7a44863c6..3a4f2965d00 100644 --- a/modules/installer/cd-dvd/installation-cd-base.nix +++ b/modules/installer/cd-dvd/installation-cd-base.nix @@ -75,6 +75,11 @@ in ./memtest.nix ./iso-image.nix ../../profiles/base.nix + + # Enable devices which are usually scanned, because we don't know the + # target system. + ../scan/detected.nix + ../scan/not-detected.nix ]; # ISO naming. @@ -134,11 +139,6 @@ in } ''; - # Include the firmware for various wireless cards. - networking.enableRT73Firmware = true; - networking.enableIntel2200BGFirmware = true; - networking.enableIntel3945ABGFirmware = true; - # To speed up installation a little bit, include the complete stdenv # in the Nix store on the CD. isoImage.storeContents = [ pkgs.stdenv pkgs.klibc pkgs.klibcShrunk ]; diff --git a/modules/installer/scan/detected.nix b/modules/installer/scan/detected.nix new file mode 100644 index 00000000000..09d04608e68 --- /dev/null +++ b/modules/installer/scan/detected.nix @@ -0,0 +1,13 @@ +# List all devices which are detected by nixos-hardware-scan. +# Common devices are enabled by default. +{config, pkgs, ...}: + +with pkgs.lib; + +{ + config = mkDefault { + # Wireless card firmware + networking.enableIntel2200BGFirmware = true; + networking.enableIntel3945ABGFirmware = true; + }; +} diff --git a/modules/installer/scan/not-detected.nix b/modules/installer/scan/not-detected.nix new file mode 100644 index 00000000000..3a4a7f40fc6 --- /dev/null +++ b/modules/installer/scan/not-detected.nix @@ -0,0 +1,12 @@ +# List all devices which are _not_ detected by nixos-hardware-scan. +# Common devices are enabled by default. +{config, pkgs, ...}: + +with pkgs.lib; + +{ + config = mkDefault { + # Wireless card firmware + networking.enableRT73Firmware = true; + }; +} diff --git a/modules/installer/tools/nixos-hardware-scan.pl b/modules/installer/tools/nixos-hardware-scan.pl index ce1085f8ebc..25ef0afe67a 100644 --- a/modules/installer/tools/nixos-hardware-scan.pl +++ b/modules/installer/tools/nixos-hardware-scan.pl @@ -227,7 +227,13 @@ my $attrs = multiLineList(" ", removeDups @attrs); print <