nixos: move bcache udev rule in a new bcache.nix module

This commit is contained in:
Luca Bruno 2014-11-10 22:09:34 +01:00
parent 31df4f70af
commit b77d166b17
3 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -127,7 +127,6 @@ 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.bcache-tools}/lib/udev/rules.d/*.rules $out/
${config.boot.initrd.extraUdevRulesCommands}
for i in $out/*.rules; do

View File

@ -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/
'';
}