{ config, lib, pkgs, inputs, ... }:

{
  imports = [
    "${inputs.uplcg.outPath}/module.nix"
  ];

  services.uplcg = {
    enable = true;
    port = 9080;
    domain = "0.0.0.0";
  };

  services.nginx.enable = true;
  services.nginx.virtualHosts."cards.stuebinm.eu" = {
    locations."/" = {
      proxyPass = "http://localhost:9080";
      proxyWebsockets = true;
    };
    enableACME = true;
    forceSSL = true;
  };
}