0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge remote-tracking branch 'origin/master' into systemd

This commit is contained in:
Eelco Dolstra 2012-09-14 13:24:03 -04:00
commit b96835f8dd
3 changed files with 38 additions and 3 deletions

View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
with pkgs.lib;
{
###### interface
options = {
hardware.cpu.amd.updateMicrocode = mkOption {
default = false;
type = types.bool;
description = ''
Update the CPU microcode for Amd processors.
'';
};
};
###### implementation
config = mkIf config.hardware.cpu.amd.updateMicrocode {
hardware.firmware = [ pkgs.amdUcode ];
boot.kernelModules = [ "microcode" ];
};
}

View file

@ -36,10 +36,10 @@ Options:
Various nix-build options are also accepted, in particular: Various nix-build options are also accepted, in particular:
--show-trace show a detailed stack trace for evaluation errors --show-trace show a detailed stack trace for evaluation errors
Environment variables affecting nixos-rebuild: Environment variables affecting nixos-rebuild:
\$NIX_PATH Nix expression search path \$NIX_PATH Nix expression search path
\$NIXOS_CONFIG path to the NixOS system configuration specification \$NIXOS_CONFIG path to the NixOS system configuration specification
EOF EOF
exit 1 exit 1
@ -85,6 +85,11 @@ while test "$#" -gt 0; do
j="$1"; shift 1 j="$1"; shift 1
extraBuildFlags="$extraBuildFlags $i $j" extraBuildFlags="$extraBuildFlags $i $j"
;; ;;
--option)
j="$1"; shift 1
k="$1"; shift 1
extraBuildFlags="$extraBuildFlags $i $j $k"
;;
--fast) --fast)
buildNix= buildNix=
extraBuildFlags="$extraBuildFlags --show-trace" extraBuildFlags="$extraBuildFlags --show-trace"
@ -202,7 +207,7 @@ fi
if test "$action" = switch -o "$action" = boot -o "$action" = test; then if test "$action" = switch -o "$action" = boot -o "$action" = test; then
# Just in case the new configuration hangs the system, do a sync now. # Just in case the new configuration hangs the system, do a sync now.
sync sync
$pathToConfig/bin/switch-to-configuration "$action" $pathToConfig/bin/switch-to-configuration "$action"
fi fi

View file

@ -16,6 +16,7 @@
./config/users-groups.nix ./config/users-groups.nix
./hardware/all-firmware.nix ./hardware/all-firmware.nix
./hardware/cpu/intel-microcode.nix ./hardware/cpu/intel-microcode.nix
./hardware/cpu/amd-microcode.nix
./hardware/network/b43.nix ./hardware/network/b43.nix
./hardware/network/intel-2100bg.nix ./hardware/network/intel-2100bg.nix
./hardware/network/intel-2200bg.nix ./hardware/network/intel-2200bg.nix