tlaternet-server/configuration/services/foundryvtt.nix

47 lines
958 B
Nix
Raw Normal View History

{ lib
, config
, flake-inputs
, ...
}:
let
2023-05-11 22:02:57 +01:00
domain = "foundryvtt.${config.services.nginx.domain}";
in
{
imports = [ flake-inputs.foundryvtt.nixosModules.foundryvtt ];
2023-05-11 22:02:57 +01:00
services.foundryvtt = {
enable = true;
hostName = domain;
minifyStaticFiles = true;
proxySSL = true;
proxyPort = 443;
2023-05-11 22:02:57 +01:00
};
# Want to start it manually when I need it, not have it constantly
# running
systemd.services.foundryvtt.wantedBy = lib.mkForce [ ];
2023-05-11 22:02:57 +01:00
services.nginx.virtualHosts."${domain}" =
let
inherit (config.services.foundryvtt) port;
in
{
forceSSL = true;
useACMEHost = "tlater.net";
enableHSTS = true;
2023-05-11 22:02:57 +01:00
locations."/" = {
proxyWebsockets = true;
proxyPass = "http://localhost:${toString port}";
};
2023-05-11 22:02:57 +01:00
};
2024-03-12 04:40:49 +00:00
services.backups.foundryvtt = {
user = "foundryvtt";
paths = [
config.services.foundryvtt.dataDir
];
pauseServices = [ "foundryvtt.service" ];
2024-03-12 04:40:49 +00:00
};
2023-05-11 22:02:57 +01:00
}