1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 10:31:36 +00:00
nixpkgs/nixos/modules/tasks/swraid.nix

18 lines
344 B
Nix
Raw Normal View History

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