diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-11-11 23:48:08 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-11-11 23:48:08 +0100 |
commit | f33fa1b66bbf181503e87a957e05c841093f2f8d (patch) | |
tree | 8cbe0596681358965ebea30c2320dc3f53297827 /nixos | |
parent | 5cf4905f3bec4c787820fae7a050c52be886c00a (diff) | |
parent | ea49ac04966380be9bc77c62c0d01862b515e6a6 (diff) | |
download | nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.tar nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.tar.gz nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.tar.bz2 nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.tar.lz nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.tar.xz nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.tar.zst nixlib-f33fa1b66bbf181503e87a957e05c841093f2f8d.zip |
Merge remote-tracking branch 'origin/master' into staging
Conflicts: pkgs/development/libraries/boost/generic.nix
Diffstat (limited to 'nixos')
-rwxr-xr-x | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 14 | ||||
-rw-r--r-- | nixos/modules/tasks/bcache.nix | 11 | ||||
-rw-r--r-- | nixos/modules/tasks/swraid.nix | 4 |
4 files changed, 28 insertions, 2 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index a709ffa2e2e9..c6187125abbf 100755 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -360,6 +360,7 @@ ./system/boot/tmp.nix ./system/etc/etc.nix ./system/upstart/upstart.nix + ./tasks/bcache.nix ./tasks/cpu-freq.nix ./tasks/encrypted-devices.nix ./tasks/filesystems.nix diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 859f9e6daa8c..755125db8664 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -129,8 +129,7 @@ let cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/ cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/ cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/ - cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/ - cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/ + ${config.boot.initrd.extraUdevRulesCommands} for i in $out/*.rules; do substituteInPlace $i \ @@ -304,6 +303,17 @@ in ''; }; + boot.initrd.extraUdevRulesCommands = mkOption { + internal = true; + default = ""; + type = types.lines; + description = '' + Shell commands to be executed in the builder of the + udev-rules derivation. This can be used to add + additional udev rules in the initial ramdisk. + ''; + }; + boot.initrd.compressor = mkOption { internal = true; default = "gzip -9"; diff --git a/nixos/modules/tasks/bcache.nix b/nixos/modules/tasks/bcache.nix new file mode 100644 index 000000000000..f988ec02af72 --- /dev/null +++ b/nixos/modules/tasks/bcache.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + + environment.systemPackages = [ pkgs.bcache-tools ]; + + boot.initrd.extraUdevRulesCommands = '' + cp -v ${pkgs.bcache-tools}/lib/udev/rules.d/*.rules $out/ + ''; + +} diff --git a/nixos/modules/tasks/swraid.nix b/nixos/modules/tasks/swraid.nix index 3b4aa9875f26..8e9728919718 100644 --- a/nixos/modules/tasks/swraid.nix +++ b/nixos/modules/tasks/swraid.nix @@ -8,4 +8,8 @@ boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid456" ]; + boot.initrd.extraUdevRulesCommands = '' + cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/ + ''; + } |