From c666955b7599c0db6d856c2f11f76c28299313cb Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Tue, 22 Sep 2015 21:10:36 +0200 Subject: [PATCH] xtreemfs: set mrc and osd as dir dependencies --- .../services/network-filesystems/xtreemfs.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/network-filesystems/xtreemfs.nix b/nixos/modules/services/network-filesystems/xtreemfs.nix index 2d57464ce046..b051214e1d08 100644 --- a/nixos/modules/services/network-filesystems/xtreemfs.nix +++ b/nixos/modules/services/network-filesystems/xtreemfs.nix @@ -72,6 +72,13 @@ let ${cfg.osd.extraConfig} ''; + optionalDir = optionals cfg.dir.enable ["xtreemfs-dir.service"]; + + systemdOptionalDependencies = { + after = [ "network.target" ] ++ optionalDir; + wantedBy = [ "multi-user.target" ] ++ optionalDir; + }; + in { @@ -441,25 +448,21 @@ in }; }; - systemd.services.xtreemfs-mrc = mkIf cfg.mrc.enable { + systemd.services.xtreemfs-mrc = mkIf cfg.mrc.enable ({ description = "XtreemFS-MRC Server"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; serviceConfig = { User = "xtreemfs"; ExecStart = "${startupScript "org.xtreemfs.mrc.MRC" mrcConfig}"; }; - }; + } // systemdOptionalDependencies); - systemd.services.xtreemfs-osd = mkIf cfg.osd.enable { + systemd.services.xtreemfs-osd = mkIf cfg.osd.enable ({ description = "XtreemFS-OSD Server"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; serviceConfig = { User = "xtreemfs"; ExecStart = "${startupScript "org.xtreemfs.osd.OSD" osdConfig}"; }; - }; + } // systemdOptionalDependencies); };