about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/unifi.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix
index 71dd38a3f476..8905ff1598ba 100644
--- a/nixos/modules/services/networking/unifi.nix
+++ b/nixos/modules/services/networking/unifi.nix
@@ -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