diff options
author | stuebinm | 2021-03-09 16:06:09 +0100 |
---|---|---|
committer | stuebinm | 2021-03-09 16:06:09 +0100 |
commit | 4cd681218cb9884234cc69314619ad5bd145fd30 (patch) | |
tree | 47f165681eeccec1aacbcffa39da2d7b40d01d9f /workadventure.nix | |
parent | 6908ecac521c0ddf3d8af75adefa7209f7a8719c (diff) |
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.
Diffstat (limited to '')
-rw-r--r-- | workadventure.nix | 10 |
1 files changed, 6 insertions, 4 deletions
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; }; }; } |