First working version of foundryvtt
This commit is contained in:
parent
e3fa1bb08f
commit
b579b307fd
1 changed files with 20 additions and 17 deletions
|
@ -6,34 +6,37 @@
|
||||||
"foundryvtt.peninsula.industries" = {
|
"foundryvtt.peninsula.industries" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:30000";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
containers.foundryvtt = {
|
containers.foundryvtt = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
config = { config, pkgs, ... }: {
|
forwardPorts = [{
|
||||||
environment.systemPackages = with pkgs; [
|
containerPort = 30000;
|
||||||
|
hostPort = 30000;
|
||||||
(fetchzip {
|
}];
|
||||||
|
config = { config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
foundryvtt = pkgs.fetchzip {
|
||||||
name = "foundryvtt";
|
name = "foundryvtt";
|
||||||
url = "file:///" + ./FoundryVTT-9.269.zip;
|
url = "file:///" + ./FoundryVTT-9.269.zip;
|
||||||
postFetch = "";
|
postFetch = "";
|
||||||
sha256 = "sha256-7YlF3tQ0XsN8CJO7WrjAhz8rHdl/pgqGUpjIJJnB0Eg=";
|
sha256 = "sha256-7YlF3tQ0XsN8CJO7WrjAhz8rHdl/pgqGUpjIJJnB0Eg=";
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
})
|
};
|
||||||
|
in {
|
||||||
nodejs-18_x
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services."foundryvtt" = {
|
systemd.services."foundryvtt" = {
|
||||||
requires = [ "network-online.target" ];
|
requires = [ "network-online.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
script = ''
|
||||||
Restart = "on-failure";
|
mkdir -p /var/lib/foundryvtt
|
||||||
ExecStart = "echo Hi, %u";
|
${pkgs.nodejs-18_x}/bin/node ${foundryvtt}/resources/app/main.js --dataPath=/var/lib/foundryvtt
|
||||||
DynamicUser = "yes";
|
'';
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue