summaryrefslogtreecommitdiff
path: root/modules/nixos/cgit.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/cgit.nix')
-rw-r--r--modules/nixos/cgit.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/nixos/cgit.nix b/modules/nixos/cgit.nix
new file mode 100644
index 0000000..177158a
--- /dev/null
+++ b/modules/nixos/cgit.nix
@@ -0,0 +1,33 @@
+{ config, ... } : { # This is for hosting on bosco
+ services.cgit = {
+ "git.myrmexia.xyz" = {
+ enable = true;
+ nginx.location = "/git/";
+ # nginx.virtualHost = "git.myrmexia.xyz";
+ settings = {
+ enable-commit-graph = 1;
+ enable-http-clone = 0;
+ };
+ repos = {
+ nixos-flake = {
+ desc = "A public repo for viewing my nixos config.";
+ path = "/srv/git/.flake.git";
+ };
+ };
+ };
+ };
+ # services.nginx.virtualHosts."git.myrmexia.xyz".listen.port = 8081;
+ # listen.port = 8081;
+ # };
+
+ # 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} ''
+ # };
+ networking.firewall.allowedTCPPorts = [8081];
+}