add caddy, podman, foundry vtt, and dokuwiki

This commit is contained in:
Lewis Wynne 2026-04-04 19:55:54 +01:00
parent 7aa50aa403
commit 8beedcf05e
3 changed files with 54 additions and 0 deletions

View file

@ -3,6 +3,8 @@
imports = [
./hardware-configuration.nix
../common
./foundry.nix
./dokuwiki.nix
];
networking.hostName = "lab";
@ -27,5 +29,14 @@
security.sudo.wheelNeedsPassword = false;
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.oci-containers.backend = "podman";
services.caddy.enable = true;
system.stateVersion = "23.11";
}

23
hosts/lab/dokuwiki.nix Normal file
View file

@ -0,0 +1,23 @@
{ ... }:
{
services.caddy.virtualHosts."wiki.wynne.rs" = {
extraConfig = ''
reverse_proxy localhost:8070
encode zstd gzip
'';
};
virtualisation.oci-containers.containers.dokuwiki = {
image = "lscr.io/linuxserver/dokuwiki:latest";
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/London";
};
volumes = [
"/srv/dokuwiki/config:/config"
"/srv/dokuwiki/cont-init.d:/custom-cont-init.d:ro"
];
ports = [ "127.0.0.1:8070:80" ];
};
}

20
hosts/lab/foundry.nix Normal file
View file

@ -0,0 +1,20 @@
{ ... }:
{
services.caddy.virtualHosts."foundry.ily.rs" = {
extraConfig = ''
reverse_proxy localhost:30000
encode zstd gzip
'';
};
virtualisation.oci-containers.containers.foundry = {
image = "node:22-slim";
cmd = [ "node" "main.js" "--dataPath=/data" ];
workdir = "/app";
volumes = [
"/srv/foundry/app:/app:ro"
"/srv/foundry/data:/data"
];
ports = [ "127.0.0.1:30000:30000" ];
};
}