@@ -208,14 +208,15 @@ in
208208
209209 formatDevice = fs:
210210 let
211− mountPoint' = escapeSystemdPath fs.mountPoint;
212− device' = escapeSystemdPath fs.device;
211+ mountPoint' = "${escapeSystemdPath fs.mountPoint}.mount";
212+ device' = escapeSystemdPath fs.device;
213+ device'' = "${device}.device";
213214 in nameValuePair "mkfs-${device'}"
214215 { description = "Initialisation of Filesystem ${fs.device}";
215− wantedBy = [ "${mountPoint'}.mount" ];
216− before = [ "${mountPoint'}.mount" "systemd-fsck@${device'}.service" ];
217− requires = [ "${device'}.device" ];
218− after = [ "${device'}.device" ];
216+ wantedBy = [ mountPoint' ];
217+ before = [ mountPoint' "systemd-fsck@${device'}.service" ];
218+ requires = [ device'' ];
219+ after = [ device'' ];
219220 path = [ pkgs.utillinux ] ++ config.system.fsPackages;
220221 script =
221222 ''