2023-05-11 22:02:57 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
flake-inputs,
|
2024-07-01 17:34:23 +01:00
|
|
|
pkgs,
|
2023-05-11 22:02:57 +01:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
domain = "foundryvtt.${config.services.nginx.domain}";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [ flake-inputs.foundryvtt.nixosModules.foundryvtt ];
|
|
|
|
|
|
|
|
services.foundryvtt = {
|
|
|
|
enable = true;
|
|
|
|
hostName = domain;
|
|
|
|
minifyStaticFiles = true;
|
2024-03-12 04:35:18 +00:00
|
|
|
proxySSL = true;
|
|
|
|
proxyPort = 443;
|
2024-07-01 17:34:23 +01:00
|
|
|
package = flake-inputs.foundryvtt.packages.${pkgs.system}.foundryvtt_11;
|
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 [ ];
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."${domain}" =
|
|
|
|
let
|
|
|
|
inherit (config.services.foundryvtt) port;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
forceSSL = true;
|
2024-04-16 00:08:13 +01:00
|
|
|
useACMEHost = "tlater.net";
|
2024-04-13 03:34:53 +01:00
|
|
|
enableHSTS = true;
|
2023-05-11 22:02:57 +01:00
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
proxyWebsockets = true;
|
|
|
|
proxyPass = "http://localhost:${toString port}";
|
2024-06-28 19:12:55 +01:00
|
|
|
};
|
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" ];
|
|
|
|
};
|
2023-05-11 22:02:57 +01:00
|
|
|
}
|