nixos/unifi: Ensure stateDir is mounted before proceeding

This commit is contained in:
William A. Kennington III 2014-12-05 12:11:47 -08:00
parent 85f5c1a1dd
commit 159af942d5

View File

@ -48,6 +48,7 @@ in
systemd.mounts = map ({ what, where }: {
bindsTo = [ "unifi.service" ];
partOf = [ "unifi.service" ];
unitConfig.RequiresMountsFor = stateDir;
options = "bind";
what = what;
where = where;
@ -59,6 +60,7 @@ in
after = [ "network.target" ] ++ systemdMountPoints;
partOf = systemdMountPoints;
bindsTo = systemdMountPoints;
unitConfig.RequiresMountsFor = stateDir;
preStart = ''
# Ensure privacy of state