* Bring back the options to enable/disable the Intel firmwares.
svn path=/nixos/branches/modular-nixos/; revision=16574
This commit is contained in:
parent
c8705704e1
commit
32bb5b2d0f
@ -1,11 +1,34 @@
|
|||||||
{pkgs, config, ...}:
|
{pkgs, config, ...}:
|
||||||
|
|
||||||
{
|
{
|
||||||
services = {
|
|
||||||
udev = {
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
networking.enableIntel2200BGFirmware = pkgs.lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = pkgs.lib.types.bool;
|
||||||
|
description = ''
|
||||||
|
Turn on this option if you want firmware for the Intel
|
||||||
|
PRO/Wireless 2200BG to be loaded automatically. This is
|
||||||
|
required if you want to use this device. Intel requires you to
|
||||||
|
accept the license for this firmware, see
|
||||||
|
<link xlink:href='http://ipw2200.sourceforge.net/firmware.php?fid=7'/>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = pkgs.lib.mkIf config.networking.enableIntel2200BGFirmware {
|
||||||
|
|
||||||
# Warning: setting this option requires acceptance of the firmware
|
# Warning: setting this option requires acceptance of the firmware
|
||||||
# license, see http://ipw2200.sourceforge.net/firmware.php?fid=7.
|
# license, see http://ipw2200.sourceforge.net/firmware.php?fid=7.
|
||||||
addFirmware = [ pkgs.ipw2200fw ];
|
services.udev.addFirmware = [ pkgs.ipw2200fw ];
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
@ -1,22 +1,29 @@
|
|||||||
{pkgs, config, ...}:
|
{pkgs, config, ...}:
|
||||||
|
|
||||||
let
|
|
||||||
inherit (config.boot) kernelPackages;
|
|
||||||
in
|
|
||||||
|
|
||||||
# !!! make this optional
|
|
||||||
|
|
||||||
{
|
{
|
||||||
boot = {
|
|
||||||
extraModulePackages =
|
###### interface
|
||||||
pkgs.lib.optional
|
|
||||||
(!kernelPackages.kernel.features ? iwlwifi)
|
options = {
|
||||||
kernelPackages.iwlwifi;
|
|
||||||
|
networking.enableIntel3945ABGFirmware = pkgs.lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
type = pkgs.lib.types.bool;
|
||||||
|
description = ''
|
||||||
|
This option enables automatic loading of the firmware for the Intel
|
||||||
|
PRO/Wireless 3945ABG.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
|
||||||
udev = {
|
|
||||||
addFirmware = [ pkgs.iwlwifi3945ucode ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = pkgs.lib.mkIf config.networking.enableIntel3945ABGFirmware {
|
||||||
|
|
||||||
|
services.udev.addFirmware = [ pkgs.iwlwifi3945ucode ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ use File::Spec;
|
|||||||
use File::Basename;
|
use File::Basename;
|
||||||
|
|
||||||
|
|
||||||
my @requireList = ();
|
my @attrs = ();
|
||||||
my @kernelModules = ();
|
my @kernelModules = ();
|
||||||
my @initrdKernelModules = ();
|
my @initrdKernelModules = ();
|
||||||
|
|
||||||
@ -96,12 +96,12 @@ sub pciCheck {
|
|||||||
# 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
|
||||||
# due to missing firmware. Ideally we would check modules.pcimap
|
# due to missing firmware. Ideally we would check modules.pcimap
|
||||||
# here.
|
# here.
|
||||||
push @requireList, "./nixos/hardware/network/intel-2200bg.nix" if
|
push @attrs, "networking.enableIntel2200BGFirmware = true;" if
|
||||||
$vendor eq "0x8086" &&
|
$vendor eq "0x8086" &&
|
||||||
($device eq "0x1043" || $device eq "0x104f" || $device eq "0x4220" ||
|
($device eq "0x1043" || $device eq "0x104f" || $device eq "0x4220" ||
|
||||||
$device eq "0x4221" || $device eq "0x4223" || $device eq "0x4224");
|
$device eq "0x4221" || $device eq "0x4223" || $device eq "0x4224");
|
||||||
|
|
||||||
push @requireList, "./nixos/hardware/network/intel-3945abg.nix" if
|
push @attrs, "networking.enableIntel3945ABGFirmware = true;" if
|
||||||
$vendor eq "0x8086" &&
|
$vendor eq "0x8086" &&
|
||||||
($device eq "0x4229" || $device eq "0x4230" ||
|
($device eq "0x4229" || $device eq "0x4230" ||
|
||||||
$device eq "0x4222" || $device eq "0x4227");
|
$device eq "0x4222" || $device eq "0x4227");
|
||||||
@ -210,19 +210,18 @@ sub multiLineList {
|
|||||||
|
|
||||||
my $initrdKernelModules = toNixExpr(removeDups @initrdKernelModules);
|
my $initrdKernelModules = toNixExpr(removeDups @initrdKernelModules);
|
||||||
my $kernelModules = toNixExpr(removeDups @kernelModules);
|
my $kernelModules = toNixExpr(removeDups @kernelModules);
|
||||||
my $requireList = multiLineList(" ", removeDups @requireList);
|
my $attrs = multiLineList(" ", removeDups @attrs);
|
||||||
|
|
||||||
print <<EOF ;
|
print <<EOF ;
|
||||||
# This is a generated file. Do not modify!
|
# This is a generated file. Do not modify!
|
||||||
# Make changes to /etc/nixos/configuration.nix instead.
|
# Make changes to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{
|
||||||
require = [$requireList];
|
|
||||||
|
|
||||||
boot.initrd.extraKernelModules = [ $initrdKernelModules ];
|
boot.initrd.extraKernelModules = [ $initrdKernelModules ];
|
||||||
boot.kernelModules = [ $kernelModules ];
|
boot.kernelModules = [ $kernelModules ];
|
||||||
|
|
||||||
nix.maxJobs = $cpus;
|
nix.maxJobs = $cpus;
|
||||||
|
|
||||||
services.xserver.videoDriver = "$videoDriver";
|
services.xserver.videoDriver = "$videoDriver";
|
||||||
|
$attrs
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
# CD-DVD modules are not generic.
|
|
||||||
# Avoid all modules from ./installer/cd-dvd/
|
|
||||||
|
|
||||||
./installer/cd-dvd/*
|
|
@ -8,6 +8,8 @@
|
|||||||
./config/timezone.nix
|
./config/timezone.nix
|
||||||
./config/unix-odbc-drivers.nix
|
./config/unix-odbc-drivers.nix
|
||||||
./config/users-groups.nix
|
./config/users-groups.nix
|
||||||
|
./hardware/network/intel-2200bg.nix
|
||||||
|
./hardware/network/intel-3945abg.nix
|
||||||
./hardware/pcmcia.nix
|
./hardware/pcmcia.nix
|
||||||
./installer/grub/grub.nix
|
./installer/grub/grub.nix
|
||||||
./installer/tools/nixos-checkout.nix
|
./installer/tools/nixos-checkout.nix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user