forked from Zynh0722/permafrost
preliminary foundry config
This commit is contained in:
parent
7e5e0240aa
commit
def4765869
1 changed files with 34 additions and 0 deletions
34
modules/foundry.nix
Normal file
34
modules/foundry.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue