permafrost/modules/forgejo.nix
2024-12-27 13:42:09 -08:00

25 lines
645 B
Nix

{ lib, config, ... }:
let
cfg = config.permafrost.nyazoom;
ACMEEnabled = config.nginx.enableACME;
in
{
options.permafrost.nyazoom = {
enable = lib.mkEnableOption "permafrost nixos module";
};
config = lib.mkIf cfg.enable {
permafrost.nginx.enable = lib.mkDefault true;
permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "git.zynh.me" ];
services.nginx.virtualHosts."git.zynh.me" = {
# TODO: Force ssl
addSSL = true;
serverName = "git.zynh.me";
useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me";
locations."/" = {
proxyPass = "http://localhost:3032";
};
};
};
}