about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/cs.emile.space.nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-09-19 10:48:16 +0200
committerEmile <git@emile.space>2024-09-19 10:48:16 +0200
commite833c13c177288b2a7b9168a784e0e6562c025b6 (patch)
tree1661dad1694989e2d83e6c2fca7b5602a61c574b /nix/hosts/corrino/www/cs.emile.space.nix
parentdcde3882d5460368e3c0499a54330f84a6995d62 (diff)
big format using nixfmt
Diffstat (limited to 'nix/hosts/corrino/www/cs.emile.space.nix')
-rw-r--r--nix/hosts/corrino/www/cs.emile.space.nix85
1 files changed, 45 insertions, 40 deletions
diff --git a/nix/hosts/corrino/www/cs.emile.space.nix b/nix/hosts/corrino/www/cs.emile.space.nix
index 4f1b91e..7aefc64 100644
--- a/nix/hosts/corrino/www/cs.emile.space.nix
+++ b/nix/hosts/corrino/www/cs.emile.space.nix
@@ -2,53 +2,58 @@
 
 let
 
-	# get's all repos configured in cgit and converts them into some JSON that is used by hound
-	repos = builtins.toJSON
-		(lib.mergeAttrsList
-			(map
-				(x: {"${x.name}" = { url = "file://${x.path}"; }; })
-				(lib.mapAttrsToList
-					(name: value: value // { name = "${name}"; })
-					config.services.cgit.main.repos)));
-in {
-	services.nginx.virtualHosts."cs.emile.space" = {
-		forceSSL = true;
-		enableACME = true;
-		locations = {
-			"/" = {
+  # get's all repos configured in cgit and converts them into some JSON that is used by hound
+  repos = builtins.toJSON (
+    lib.mergeAttrsList (
+      map
+        (x: {
+          "${x.name}" = {
+            url = "file://${x.path}";
+          };
+        })
+        (lib.mapAttrsToList (name: value: value // { name = "${name}"; }) config.services.cgit.main.repos)
+    )
+  );
+in
+{
+  services.nginx.virtualHosts."cs.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+    locations = {
+      "/" = {
         proxyPass = "http://${config.services.hound.listen}";
-			};
-		};
-	};
+      };
+    };
+  };
 
-	# add hound user to git group so the local repos can be read
+  # add hound user to git group so the local repos can be read
   # users.users.hound.extraGroups = [ "git" ];
 
-	users.groups."git".members = [ "hound" ];
+  users.groups."git".members = [ "hound" ];
 
-	# The `.gitignore` of the user `hound` should contain the following:
-	#
-	# [safe]
+  # The `.gitignore` of the user `hound` should contain the following:
+  #
+  # [safe]
   #       directory = /var/lib/git/repositories/*
   #       directory = /var/lib/git/repositories/faila.git
   #       directory = /var/lib/git/repositories/faila2.git
 
-	services.hound = {
-		enable = true;
-
-		config = ''
-			{
-			  "dbpath": "/var/lib/hound/data",
-			  "max-concurrent-indexers" : 6,
-		    "vcs-config" : {
-	        "git" : {
-            "detect-ref" : true
-	        }
-		    },
-			  "repos" : ${repos}
-			}
-		'';
-
-		listen = "127.0.0.1:${toString config.emile.ports.hound}";
-	};
+  services.hound = {
+    enable = true;
+
+    config = ''
+      			{
+      			  "dbpath": "/var/lib/hound/data",
+      			  "max-concurrent-indexers" : 6,
+      		    "vcs-config" : {
+      	        "git" : {
+                  "detect-ref" : true
+      	        }
+      		    },
+      			  "repos" : ${repos}
+      			}
+      		'';
+
+    listen = "127.0.0.1:${toString config.emile.ports.hound}";
+  };
 }