1
0
Fork 0
dotfiles/system/nixos/convos.nix

48 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2023-07-16 22:17:50 +00:00
{ lib, ... }:
2023-05-24 11:02:56 +00:00
{
systemd.tmpfiles.rules = [
"d /var/lib/convos 0755 root root"
];
virtualisation.oci-containers.containers.convos = {
image = "docker.io/convos/convos:stable";
ports = [ "192.168.42.2:3000:3000" ];
environment = {
"CONVOS_REVERSE_PROXY" = "1";
"TZ" = "Etc/UTC";
};
volumes = [
"/var/lib/convos:/data"
];
extraOptions = [
"--network=ns:/var/run/netns/wg"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
systemd.services.podman-convos = {
bindsTo = [ "wg.service" ];
after = lib.mkForce [ "wg.service" ];
};
services.nginx.virtualHosts."convos.internal.kempkens.network" = {
quic = true;
http3 = true;
onlySSL = true;
useACMEHost = "internal.kempkens.network";
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://192.168.42.2:3000";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Request-Base "$scheme://$host/";
'';
};
};
}