From 4cd681218cb9884234cc69314619ad5bd145fd30 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 9 Mar 2021 16:06:09 +0100 Subject: Added option to switch whole packageset to module Since there are now multiple packaged versions of workadventure, all of which come in a set with the same attribute names, it seems reasonable to just plug those sets into the module, instead of each package individually. --- workadventure.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'workadventure.nix') diff --git a/workadventure.nix b/workadventure.nix index f73cab8..c972d40 100644 --- a/workadventure.nix +++ b/workadventure.nix @@ -56,7 +56,7 @@ let User = "workadventure-backend"; Group = "workadventure-backend"; DynamicUser = true; # Note: this implies a lot of other security features. - ExecStart = "${instanceConfig.backend.package}/bin/workadventureback"; + ExecStart = "${instanceConfig.packageset.back}/bin/workadventureback"; Restart = "always"; RestartSec = "10s"; }; @@ -83,7 +83,7 @@ let User = "workadventure-pusher"; Group = "workadventure-pusher"; DynamicUser = true; - ExecStart = "${instanceConfig.pusher.package}/bin/workadventurepusher"; + ExecStart = "${instanceConfig.packageset.pusher}/bin/workadventurepusher"; Restart = "always"; RestartSec = "10s"; }; @@ -95,7 +95,7 @@ let let fc = instanceConfig.frontend; cc = instanceConfig.commonConfig; in - fc.package.override { + instanceConfig.packageset.front.override { environment = { DEBUG_MODE = if fc.debugMode then "true" else "false"; # toString bool behaves weird START_ROOM_URL = fc.startRoomUrl; @@ -136,7 +136,9 @@ let }; "/maps/" = mkIf instanceConfig.nginx.maps.serve { - alias = instanceConfig.nginx.maps.path; + alias = if instanceConfig.nginx.maps.path == null + then instanceConfig.packageset.maps.outPath + "/workadventuremaps" + else instanceConfig.nginx.maps.path; }; }; } -- cgit v1.2.3