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