diff --git a/modules/forgejo.nix b/modules/forgejo.nix index ca9fce1..e2fc2b9 100644 --- a/modules/forgejo.nix +++ b/modules/forgejo.nix @@ -2,6 +2,7 @@ let cfg = config.permafrost.nyazoom; + ACMEEnabled = config.nginx.enableACME; in { options.permafrost.nyazoom = { @@ -10,10 +11,11 @@ in config = lib.mkIf cfg.enable { permafrost.nginx.enable = lib.mkDefault true; - permafrost.nginx.certDomains = [ "git.zynh.me" ]; + permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "git.zynh.me" ]; services.nginx.virtualHosts."git.zynh.me" = { addSSL = true; serverName = "git.zynh.me"; + useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me"; locations."/" = { proxyPass = "http://localhost:3032"; }; diff --git a/modules/foundry.nix b/modules/foundry.nix index dd4a3e5..b6dd14f 100644 --- a/modules/foundry.nix +++ b/modules/foundry.nix @@ -2,6 +2,7 @@ let cfg = config.permafrost.foundry; + ACMEEnabled = config.nginx.enableACME; in { options.permafrost.foundry = { @@ -10,10 +11,11 @@ in config = lib.mkIf cfg.enable { permafrost.nginx.enable = lib.mkDefault true; - permafrost.nginx.certDomains = [ "scarlet.zynh.me" ]; + permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "scarlet.zynh.me" ]; services.nginx.virtualHosts."scarlet.zynh.me" = { addSSL = true; serverName = "scarlet.zynh.me"; + useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me"; locations."/" = { extraConfig = /* nginx */ '' # Set proxy headers diff --git a/modules/nyazoom.nix b/modules/nyazoom.nix index f7201d7..6c640f9 100644 --- a/modules/nyazoom.nix +++ b/modules/nyazoom.nix @@ -4,6 +4,7 @@ let nyazoom = inputs.nyazoom.packages.${pkgs.system}.default; cfg = config.permafrost.nyazoom; + ACMEEnabled = config.nginx.enableACME; in { options.permafrost.nyazoom = { @@ -22,10 +23,11 @@ in }; permafrost.nginx.enable = lib.mkDefault true; - permafrost.nginx.certDomains = [ "nyazoom.zynh.me" ]; + permafrost.nginx.certDomains = lib.mkIf ACMEEnabled [ "nyazoom.zynh.me" ]; services.nginx.virtualHosts."nyazoom.zynh.me" = { addSSL = true; serverName = "nyazoom.zynh.me"; + useACMEHost = lib.mkIf ACMEEnabled "scarlet.zynh.me"; locations."/" = { proxyPass = "http://localhost:3000"; extraConfig = /* nginx */ ''