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: formatDevice = fs:
let let
mountPoint' = escapeSystemdPath fs.mountPoint; mountPoint' = "${escapeSystemdPath fs.mountPoint}.mount";
device' = escapeSystemdPath fs.device; device' = escapeSystemdPath fs.device;
device'' = "${device}.device";
in nameValuePair "mkfs-${device'}" in nameValuePair "mkfs-${device'}"
{ description = "Initialisation of Filesystem ${fs.device}"; { description = "Initialisation of Filesystem ${fs.device}";
wantedBy = [ "${mountPoint'}.mount" ]; wantedBy = [ mountPoint' ];
before = [ "${mountPoint'}.mount" "systemd-fsck@${device'}.service" ]; before = [ mountPoint' "systemd-fsck@${device'}.service" ];
requires = [ "${device'}.device" ]; requires = [ device'' ];
after = [ "${device'}.device" ]; after = [ device'' ];
path = [ pkgs.utillinux ] ++ config.system.fsPackages; path = [ pkgs.utillinux ] ++ config.system.fsPackages;
script = script =
'' ''