{ config, ... }:
let
  domain = "logseq.${config.networking.domain}";
in
{
  virtualisation.oci-containers = {
    containers.logseq = {
      image = "ghcr.io/logseq/logseq-webapp:latest";
      ports = [ "127.0.0.1:8045:80" ];
    };
  };
  services.caddy.virtualHosts."${domain}".extraConfig = ''
    reverse_proxy 127.0.0.1:8045
  '';
}
