3
0
Fork 0
forked from mirrors/nixpkgs

* Option to enable the Intel 3945 firmware. (It's enabled by

default since it doesn't seem to have the legal issues of
  the Intel 2200 firmware.)
* Firmware loader: don't write in /tmp.  Also a hack to quickly
  test new firmwares.
* Revert r10105 since the build fails if configuration.nix 
  is a symlink.  Anyway copying configuration.nix does not
  necessarily make sense since it can import other expressions,
  which would also have to be copied.  Perhaps a better 
  approach would be to write a serialisation of the config
  to a file (maybe with builtins.toXML).

svn path=/nixos/trunk/; revision=10127
This commit is contained in:
Eelco Dolstra 2008-01-12 22:53:13 +00:00
parent 4475a74fb8
commit cfed953b5f
5 changed files with 19 additions and 14 deletions

View file

@ -4,8 +4,7 @@ let
let env = builtins.getEnv "NIXOS_CONFIG"; in
if env == "" then /etc/nixos/configuration.nix else env;
system = import system/system.nix {configuration = import configFileName;
inherit configFileName; };
system = import system/system.nix {configuration = import configFileName;};
in

View file

@ -338,6 +338,14 @@
";
};
enableIntel3945ABGFirmware = mkOption {
default = true;
description = "
This option enables automatic loading of the firmware for the Intel
PRO/Wireless 3945ABG.
";
};
localCommands = mkOption {
default = "";
example = "text=anything; echo You can put $text here.";

View file

@ -1,7 +1,6 @@
{ platform ? __currentSystem
, stage2Init ? ""
, configuration
, configFileName ? ""
}:
rec {
@ -247,10 +246,7 @@ rec {
++ pkgs.lib.optional (config.networking.defaultMailServer.directDelivery) pkgs.ssmtp
++ pkgs.lib.concatLists (map (job: job.extraPath) upstartJobs.jobs)
++ (config.environment.extraPackages) pkgs
++ pkgs.lib.optional (config.fonts.enableFontDir) fontDir
++ pkgs.lib.optional (configFileName != "" )
(pkgs.runCommand "configuration" {} '' mkdir -p $out/share && cp "${configFileName}" $out/share/configuration.nix '')
;
++ pkgs.lib.optional (config.fonts.enableFontDir) fontDir;
# We don't want to put all of `startPath' and `path' in $PATH, since

View file

@ -26,12 +26,12 @@ let
inherit (pkgs) stdenv writeText substituteAll udev procps;
inherit (pkgs.lib) cleanSource;
firmwareDirs =
pkgs.lib.optional (config.networking.enableIntel2200BGFirmware) pkgs.ipw2200fw
++
(config.services.udev.addFirmware);
pkgs.lib.optional config.networking.enableIntel2200BGFirmware pkgs.ipw2200fw
++ pkgs.lib.optional config.networking.enableIntel3945ABGFirmware pkgs.iwlwifi3945ucode
++ config.services.udev.addFirmware;
extraUdevPkgs =
pkgs.lib.optional (config.services.hal.enable) pkgs.hal;
sndMode = config.services.udev.sndMode;
pkgs.lib.optional config.services.hal.enable pkgs.hal;
sndMode = config.services.udev.sndMode;
})
# Makes LVM logical volumes available.

View file

@ -6,14 +6,16 @@ exec > /var/log/udev-fw 2>&1
if test "$ACTION" = "add"; then
ls -l /sys/$DEVPATH >> /tmp/fw 2>&1
ls -l /sys/$DEVPATH
if ! test -e /sys/$DEVPATH/loading; then
echo "Firmware loading is not supported by device \`DEVPATH'."
exit 1
fi
for dir in @firmwareDirs@; do
# /root/test-firmware is an impure location allowing quick testing
# of firmwares.
for dir in /root/test-firmware @firmwareDirs@; do
if test -e "$dir/$FIRMWARE"; then
echo "Loading \`$FIRMWARE' for device \`$DEVPATH' from $dir."
echo 1 > /sys/$DEVPATH/loading