dotfiles/nixos/boxes/vpsfree1/foundryvtt.nix

42 lines
936 B
Nix
Raw Normal View History

2022-06-18 08:44:06 +01:00
{ 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";
};
};
};
};
}