services: Add FoundryVTT service
This commit is contained in:
parent
14d29fa49d
commit
a3e2d2931c
35
configuration/services/foundryvtt.nix
Normal file
35
configuration/services/foundryvtt.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
enableACME = true;
|
||||||
|
extraConfig = ''
|
||||||
|
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||||
|
'';
|
||||||
|
|
||||||
|
locations."/" = {
|
||||||
|
proxyWebsockets = true;
|
||||||
|
proxyPass = "http://localhost:${toString port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
21
flake.lock
21
flake.lock
|
@ -256,6 +256,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"foundryvtt": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1677026752,
|
||||||
|
"narHash": "sha256-cYeFDzb0kmKQhBuN0vYWoLulCqj3vf7QhvnsPBO66vc=",
|
||||||
|
"owner": "reckenrode",
|
||||||
|
"repo": "nix-foundryvtt",
|
||||||
|
"rev": "6c52bfc6824a3dba673df4894a71193ec32aa399",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "reckenrode",
|
||||||
|
"repo": "nix-foundryvtt",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ghc-utils": {
|
"ghc-utils": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -499,6 +519,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"deploy-rs": "deploy-rs",
|
"deploy-rs": "deploy-rs",
|
||||||
|
"foundryvtt": "foundryvtt",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nvfetcher": "nvfetcher",
|
"nvfetcher": "nvfetcher",
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
url = "git+https://gitea.tlater.net/tlaternet/tlaternet.git";
|
url = "git+https://gitea.tlater.net/tlaternet/tlaternet.git";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
foundryvtt = {
|
||||||
|
url = "github:reckenrode/nix-foundryvtt";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
Loading…
Reference in a new issue