dotfiles/hosts/h001/containers/opengist.nix
2025-04-30 17:51:47 -05:00

35 lines
657 B
Nix

{
...
}:
let
name = "opengist";
hostDataDir = "/var/lib/${name}";
v_port = 6157;
in
{
virtualisation.oci-containers.containers = {
opengist = {
user = "root";
image = "ghcr.io/thomiceli/opengist:1";
ports = [
"127.0.0.1:${toString v_port}:${toString v_port}"
];
volumes = [
"${hostDataDir}:/opengist"
];
environment = {
OG_LOG_LEVEL = "info";
};
};
};
services.nginx.virtualHosts."gist.joshuabell.xyz" = {
locations = {
"/" = {
proxyWebsockets = true;
proxyPass = "http://127.0.0.1:${builtins.toString v_port}";
};
};
};
}