summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDevin Finlinson <devin.finlinson@pm.me>2025-02-09 17:38:14 -0700
committerDevin Finlinson <devin.finlinson@pm.me>2025-02-09 17:38:14 -0700
commitea75d13a23afe5cec83e3348f92a8654324957e5 (patch)
treee36c4e456f39cbfdb2ac1371b02ed2530b827104 /modules
parent180774223857e0f3018c4eb90e2ed27911921bb5 (diff)
adding caddy reverse proxy for cgit
Diffstat (limited to 'modules')
-rw-r--r--modules/nixos/cgit.nix24
1 files changed, 14 insertions, 10 deletions
diff --git a/modules/nixos/cgit.nix b/modules/nixos/cgit.nix
index c4ef76a..f1d4d55 100644
--- a/modules/nixos/cgit.nix
+++ b/modules/nixos/cgit.nix
@@ -1,10 +1,13 @@
-{ config, pkgs, ... } : { # This is for hosting on bosco
+{ config, pkgs, ... } :
+let
+ domain = "myrmexia.xyz";
+ subDomain = "git.${domain}";
+ email = "devin.finlinson@pm.me";
+in { # This is for hosting on bosco
services.cgit = {
- "git.myrmexia.xyz" = {
+ "${subDomain}" = {
user = "cgit";
enable = true;
- nginx.location = "/";
- # nginx.virtualHost = "git.myrmexia.xyz";
settings = {
enable-commit-graph = 1;
enable-http-clone = 0;
@@ -25,11 +28,12 @@
# this solution is extremely hacky as it changes nginx system defaults instead of virtual host default
#TODO: fix
services.nginx.defaultHTTPListenPort = 8081;
- # caddy = {
- # enable = true;
- # email = "devin.finlinson@pm.me";
- # virtualhosts."git.myrmexia.xyz".extraConfig = ''
- # reverse_proxy http://localhost:${toString config.services.cgit.port} ''
- # };
+ caddy = {
+ enable = true;
+ email = "${email}";
+ virtualhosts."git.myrmexia.xyz".extraConfig = ''
+ "reverse_proxy http://localhostt:8081" '';
+ # reverse_proxy http://localhost:${toString config.services.cgit.port} ''
+ };
networking.firewall.allowedTCPPorts = [8081];
}