mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
eb6e1310b8
svn path=/nixos/trunk/; revision=29285
34 lines
668 B
Nix
34 lines
668 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
###### implementation
|
|
|
|
config = {
|
|
|
|
jobs.lvm =
|
|
{ startOn = "started udev or new-devices";
|
|
|
|
script =
|
|
''
|
|
# Scan for block devices that might contain LVM physical volumes
|
|
# and volume groups.
|
|
${pkgs.lvm2}/sbin/vgscan
|
|
|
|
# Make all logical volumes on all volume groups available, i.e.,
|
|
# make them appear in /dev.
|
|
${pkgs.lvm2}/sbin/vgchange --available y
|
|
|
|
initctl emit -n new-devices
|
|
'';
|
|
|
|
task = true;
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.lvm2 ];
|
|
|
|
services.udev.packages = [ pkgs.lvm2 ];
|
|
|
|
};
|
|
|
|
}
|