Skip to content

Commit

Permalink
Add 2 index file to define the default case for detected and not-dete…
Browse files Browse the repository at this point in the history
…cted

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
  • Loading branch information
nbp committed Sep 25, 2010
1 parent c90a7b9 commit cf103b8
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/installer/cd-dvd/installation-cd-base.nix
Expand Up @@ -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.
Expand Down Expand Up @@ -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 ];
Expand Down
13 changes: 13 additions & 0 deletions 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;
};
}
12 changes: 12 additions & 0 deletions 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;
};
}
6 changes: 6 additions & 0 deletions modules/installer/tools/nixos-hardware-scan.pl
Expand Up @@ -227,7 +227,13 @@ sub multiLineList {
print <<EOF ;
# This is a generated file. Do not modify!
# Make changes to /etc/nixos/configuration.nix instead.
{modulesPath, ...}:
{
require = [
"\${modulesPath}/installer/scan/not-detected.nix"
];
boot.initrd.kernelModules = [ $initrdKernelModules ];
boot.kernelModules = [ $kernelModules ];
Expand Down

0 comments on commit cf103b8

Please sign in to comment.