diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix index cc9e2b93471..b6f957ddde8 100644 --- a/nixos/modules/services/networking/unifi.nix +++ b/nixos/modules/services/networking/unifi.nix @@ -29,22 +29,25 @@ in systemd.mounts = [ { - unitConfig.StopWhenUnneeded = true; + bindsTo = [ "unifi.service" ]; requiredBy = [ "unifi.service" ]; + before = [ "unifi.service" ]; what = "${pkgs.unifi}/dl"; where = "${stateDir}/dl"; options = "bind"; } { - unitConfig.StopWhenUnneeded = true; + bindsTo = [ "unifi.service" ]; requiredBy = [ "unifi.service" ]; + before = [ "unifi.service" ]; what = "${pkgs.unifi}/lib"; where = "${stateDir}/lib"; options = "bind"; } { - unitConfig.StopWhenUnneeded = true; + bindsTo = [ "unifi.service" ]; requiredBy = [ "unifi.service" ]; + before = [ "unifi.service" ]; what = "${pkgs.mongodb}/bin"; where = "${stateDir}/bin"; options = "bind";