package OuterWildsTextAdventureWeb as caddy service
This commit is contained in:
parent
5844040624
commit
cae1182840
10 changed files with 119 additions and 16 deletions
|
|
@ -30,6 +30,7 @@
|
|||
enable = true;
|
||||
baseDomain = "youthlic.fun";
|
||||
radicle-explorer.enable = true;
|
||||
outer-wilds-text-adventure.enable = true;
|
||||
};
|
||||
juicity.server.enable = true;
|
||||
};
|
||||
|
|
|
|||
27
nixos/modules/programs/caddy/OuterWildsTextAdventure.nix
Normal file
27
nixos/modules/programs/caddy/OuterWildsTextAdventure.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
in {
|
||||
imports = [
|
||||
./radicle-explorer.nix
|
||||
./OuterWildsTextAdventure.nix
|
||||
];
|
||||
options = {
|
||||
youthlic.programs.caddy = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue