services: Add FoundryVTT service
This commit is contained in:
parent
14d29fa49d
commit
008a9b91c2
3 changed files with 52 additions and 0 deletions
27
configuration/services/foundryvtt.nix
Normal file
27
configuration/services/foundryvtt.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
flake-inputs,
|
||||
...
|
||||
}: let
|
||||
domain = "foundryvtt.${config.services.nginx.domain}";
|
||||
in {
|
||||
imports = [flake-inputs.foundryvtt.nixosModules.foundryvtt];
|
||||
|
||||
services.foundryvtt = {
|
||||
enable = true;
|
||||
hostName = domain;
|
||||
minifyStaticFiles = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = let
|
||||
inherit (config.services.foundryvtt) port;
|
||||
in {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||
'';
|
||||
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue