package OuterWildsTextAdventureWeb as caddy service

This commit is contained in:
ulic-youthlic 2025-05-31 03:42:12 +08:00
parent 5844040624
commit cae1182840
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
10 changed files with 119 additions and 16 deletions

View file

@ -30,6 +30,7 @@
enable = true;
baseDomain = "youthlic.fun";
radicle-explorer.enable = true;
outer-wilds-text-adventure.enable = true;
};
juicity.server.enable = true;
};

View file

@ -0,0 +1,27 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.youthlic.programs.caddy.outer-wilds-text-adventure;
caddy-cfg = config.youthlic.programs.caddy;
in {
options = {
youthlic.programs.caddy.outer-wilds-text-adventure = {
enable = lib.mkEnableOption "caddy.OuterWildsTextAdventure";
};
};
config = lib.mkIf (cfg.enable && caddy-cfg.enable) {
services.caddy.virtualHosts = {
"outer-wilds.${caddy-cfg.baseDomain}" = {
extraConfig = ''
root * ${pkgs.OuterWildsTextAdventure}
encode zstd gzip
try_files {path} /index.html
file_server
'';
};
};
};
}

View file

@ -7,6 +7,7 @@
in {
imports = [
./radicle-explorer.nix
./OuterWildsTextAdventure.nix
];
options = {
youthlic.programs.caddy = {