3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/tasks/swraid.nix

16 lines
305 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
{
environment.systemPackages = [ pkgs.mdadm ];
services.udev.packages = [ pkgs.mdadm ];
boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid456" ];
boot.initrd.extraUdevRulesCommands = ''
cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/
'';
}