diff --git a/default.nix b/default.nix index 481202b75ca..09c9a1569d8 100644 --- a/default.nix +++ b/default.nix @@ -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 diff --git a/system/options.nix b/system/options.nix index 8511e65a066..bf571d56635 100644 --- a/system/options.nix +++ b/system/options.nix @@ -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."; diff --git a/system/system.nix b/system/system.nix index a1ceb345ccd..5b6f23749f0 100644 --- a/system/system.nix +++ b/system/system.nix @@ -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 diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index 6fceee08cfe..7fe6d45dfe6 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -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. diff --git a/upstart-jobs/udev-firmware-loader.sh b/upstart-jobs/udev-firmware-loader.sh index 03f0290fd33..3592e72bb13 100755 --- a/upstart-jobs/udev-firmware-loader.sh +++ b/upstart-jobs/udev-firmware-loader.sh @@ -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