From 12ad29226c4186e1e3a8633061e61a651a36a4a5 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Tue, 5 Aug 2014 22:09:15 -0500 Subject: [PATCH] nixos/unifi: Fix ordering of mount rules --- nixos/modules/services/networking/unifi.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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";