nixos: tasks/fileSystems: cleanup

This commit is contained in:
Jan Malakhovski 2015-11-25 19:09:43 +00:00
parent 1266852fd8
commit 2c8ca0d1bd

View file

@ -208,14 +208,15 @@ in
formatDevice = fs:
let
mountPoint' = escapeSystemdPath fs.mountPoint;
device' = escapeSystemdPath fs.device;
mountPoint' = "${escapeSystemdPath fs.mountPoint}.mount";
device' = escapeSystemdPath fs.device;
device'' = "${device}.device";
in nameValuePair "mkfs-${device'}"
{ description = "Initialisation of Filesystem ${fs.device}";
wantedBy = [ "${mountPoint'}.mount" ];
before = [ "${mountPoint'}.mount" "systemd-fsck@${device'}.service" ];
requires = [ "${device'}.device" ];
after = [ "${device'}.device" ];
wantedBy = [ mountPoint' ];
before = [ mountPoint' "systemd-fsck@${device'}.service" ];
requires = [ device'' ];
after = [ device'' ];
path = [ pkgs.utillinux ] ++ config.system.fsPackages;
script =
''