From cf103b8d4df4c5f364f8e9bb9682a21c925bc2e6 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 25 Sep 2010 09:32:37 +0000 Subject: [PATCH] Add 2 index file to define the default case for detected and not-detected devices. These are used to replace hand made listings in the basic installation CD. The configuration file, which is generated by nixos-hardware-scan, enables not-detected devices by default. svn path=/nixos/trunk/; revision=23911 --- modules/installer/cd-dvd/installation-cd-base.nix | 10 +++++----- modules/installer/scan/detected.nix | 13 +++++++++++++ modules/installer/scan/not-detected.nix | 12 ++++++++++++ modules/installer/tools/nixos-hardware-scan.pl | 6 ++++++ 4 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 modules/installer/scan/detected.nix create mode 100644 modules/installer/scan/not-detected.nix 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 <