{ config, pkgs, ... }:

{
  services.forgejo = {
    enable = true;
    database.type = "sqlite3";    
    settings = {
      server = {
        DOMAIN = "git.danielk.me";
        ROOT_URL = "https://git.danielk.me/";
        HTTP_PORT = 3723;
      };
    };
  };

  services.caddy.virtualHosts."git.danielk.me" = {
    extraConfig = ''
      reverse_proxy 127.0.0.1:3723
    '';
  };
}
