forked from Zynh0722/permafrost
25 lines
650 B
Nix
25 lines
650 B
Nix
{ lib, config, ... }:
|
|
|
|
let
|
|
cfg = config.permafrost.forgejo;
|
|
ACMEEnabled = config.permafrost.nginx.enableACME;
|
|
in
|
|
{
|
|
options.permafrost.forgejo = {
|
|
enable = lib.mkEnableOption "forgejo 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 "permafrost";
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:3032";
|
|
};
|
|
};
|
|
};
|
|
}
|