summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLuca Bruno <lethalman88@gmail.com>2014-11-10 22:09:34 +0100
committerLuca Bruno <lethalman88@gmail.com>2014-11-10 22:19:43 +0100
commitb77d166b175baebacb7998fe73f3ea4f0d5a7292 (patch)
tree6f79c0c9b87666e00ba19acee25aef92a1054523 /nixos
parent31df4f70afbe0ca3e5fa1f52f4a9c4c28f23c61a (diff)
downloadnixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.tar
nixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.tar.gz
nixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.tar.bz2
nixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.tar.lz
nixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.tar.xz
nixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.tar.zst
nixlib-b77d166b175baebacb7998fe73f3ea4f0d5a7292.zip
nixos: move bcache udev rule in a new bcache.nix module
Diffstat (limited to 'nixos')
-rwxr-xr-xnixos/modules/module-list.nix1
-rw-r--r--nixos/modules/system/boot/stage-1.nix1
-rw-r--r--nixos/modules/tasks/bcache.nix11
3 files changed, 12 insertions, 1 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 2a0dd005e494..33c9a70eb1b2 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -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
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/
+  ''; 
+
+}