skeleton of foundryvtt service

This commit is contained in:
Cyryl Płotnicki 2022-06-18 08:44:06 +01:00
parent ea9241c9ab
commit e3fa1bb08f
4 changed files with 43 additions and 1 deletions

View file

@ -8,6 +8,7 @@
../../server-security.nix ../../server-security.nix
../../server-common.nix ../../server-common.nix
../../tailscale.nix ../../tailscale.nix
./foundryvtt.nix
]; ];
systemd.extraConfig = '' systemd.extraConfig = ''

View file

@ -0,0 +1,41 @@
{ config, pkgs, inputs, lib, ... }: {
imports = [ ../nginx.nix ];
services.nginx = {
virtualHosts = {
"foundryvtt.peninsula.industries" = {
forceSSL = true;
enableACME = true;
};
};
};
containers.foundryvtt = {
autoStart = true;
config = { config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
(fetchzip {
name = "foundryvtt";
url = "file:///" + ./FoundryVTT-9.269.zip;
postFetch = "";
sha256 = "sha256-7YlF3tQ0XsN8CJO7WrjAhz8rHdl/pgqGUpjIJJnB0Eg=";
stripRoot = false;
})
nodejs-18_x
];
systemd.services."foundryvtt" = {
requires = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Restart = "on-failure";
ExecStart = "echo Hi, %u";
DynamicUser = "yes";
};
};
};
};
}

View file

@ -6,7 +6,7 @@
./tailscale-vultr1.nix ./tailscale-vultr1.nix
./folding.nix ./folding.nix
./matrix-front.nix ./matrix-front.nix
./nginx.nix ./../nginx.nix
./search.nix ./search.nix
./snowflake.nix ./snowflake.nix
../cli.nix ../cli.nix