preliminary foundry config

This commit is contained in:
Zynh Ludwig 2024-12-27 06:21:59 -08:00
parent 7e5e0240aa
commit def4765869

34
modules/foundry.nix Normal file
View file

@ -0,0 +1,34 @@
{ lib, config, ... }:
let
cfg = config.permafrost.foundry;
in
{
options.permafrost.foundry = {
enable = lib.mkEnableOption "foundry nixos module";
};
config = lib.mkIf cfg.enable {
permafrost.nginx.enable = lib.mkDefault true;
services.nginx.virtualHosts."scarlet.zynh.me" = {
addSSL = true;
serverName = "scarlet.zynh.me";
locations."/" = {
extraConfig = /* nginx */ ''
# Set proxy headers
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# These are important to support WebSockets
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
# Make sure to set your Foundry VTT port number
proxy_pass http://localhost:30000;
'';
proxyPass = "http://localhost:30000";
};
};
};
}