mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Move everyting to hel1 except emails
This commit is contained in:
parent
0d3f1b4afc
commit
f18644f8a1
18 changed files with 476 additions and 448 deletions
44
modules/foundryvtt.nix
Normal file
44
modules/foundryvtt.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.services.foundryvtt;
|
||||
in
|
||||
{
|
||||
options.custom.services.foundryvtt = {
|
||||
enable = lib.mkEnableOption "foundryvtt";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.foundryvtt = {
|
||||
enable = true;
|
||||
package = inputs.foundryvtt.packages.${pkgs.system}.foundryvtt_12;
|
||||
hostName = "vtt.${config.networking.domain}";
|
||||
language = "fr.core";
|
||||
proxyPort = 443;
|
||||
proxySSL = true;
|
||||
upnp = false;
|
||||
dataDir = "/nix/var/data/foundryvtt";
|
||||
};
|
||||
systemd.services.foundryvtt.serviceConfig = {
|
||||
StateDirectory = lib.mkForce null;
|
||||
ReadWritePaths = config.services.foundryvtt.dataDir;
|
||||
};
|
||||
services.nginx.virtualHosts."vtt.${config.networking.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.foundryvtt.port}";
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue