about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nix/hosts/corrino/ports.nix81
-rw-r--r--nix/modules/default.nix7
-rw-r--r--nix/modules/ports/README.md4
-rw-r--r--nix/modules/ports/default.nix10
4 files changed, 43 insertions, 59 deletions
diff --git a/nix/hosts/corrino/ports.nix b/nix/hosts/corrino/ports.nix
index e00cf22..328d12a 100644
--- a/nix/hosts/corrino/ports.nix
+++ b/nix/hosts/corrino/ports.nix
@@ -1,62 +1,25 @@
 {
-	# 19xx
-	stream_rtmp = 1935;
-	
-	# 20xx
-	initrd_ssh = 2222;
-	photo = 2342;
-
-	# 30xx
-	git = 3000;
-	hydra = 3001;
-	grafana = 3002;
-	md = 3003;
-	gotosocial = 3004;
-
-	sftpgo = {
-		webdav = 3304;
-		httpd = 3305;
-		metrics = 3306;
+	ports.emile = {
+		stream_rtmp = 1935;
+		initrd_ssh = 2222;
+		photo = 2342;
+		git = 3000;
+		hydra = 3001;
+		grafana = 3002;
+		md = 3003;
+		gotosocial = 3004;
+		stream = 8080;
+		netbox = 8001;
+		restic = 8002;
+		ctf = 8338;
+		magic-hash = 8339;
+		tickets = 8349;
+		talks = 8350;
+		authelia = 9091;
+		prometheus = 9003;
+		gitDaemon = 9418;
+		prometheus_node_exporter = 9002;
+		prometheus_systemd_exporter = 9558;
+		prometheus_smartctl_exporter = 9633;
 	};
-
-	# 34xx
-	# cs = 3463;
-
-	# 40xx
-	events = 4000;
-	seafile = 4001;
-
-	# 54xx
-	pgweb = 5432;
-
-	garage = {
-		rpcPort = 4101;
-		apiPort = 4102;
-		webPort = 4103;
-		adminPort = 4104;
-	};
-
-	# 80xx
-	stream = 8080;
-	netbox = 8001;
-	restic = 8002;
-	# 8003
-	jupyter = 8004;
-
-	# 83xx
-	ctf = 8338;
-	magic-hash = 8339;
-
-	tickets = 8349;
-	talks = 8350;
-
-	# 90xx
-	authelia = 9091;
-	prometheus_node_exporter = 9002;
-	prometheus = 9003;
-	loki = 9004;
-	promtail = 9005;
-	gitDaemon = 9418;
-	prometheus_systemd_exporter = 9558;
-	prometheus_smartctl_exporter = 9633;
 }
diff --git a/nix/modules/default.nix b/nix/modules/default.nix
new file mode 100644
index 0000000..767e466
--- /dev/null
+++ b/nix/modules/default.nix
@@ -0,0 +1,7 @@
+{ ... }:
+
+{
+  imports = [
+    ./ports
+  ];
+}
diff --git a/nix/modules/ports/README.md b/nix/modules/ports/README.md
new file mode 100644
index 0000000..c0aa718
--- /dev/null
+++ b/nix/modules/ports/README.md
@@ -0,0 +1,4 @@
+# ports
+
+A super simple nix module which doesn't do anything and is only there so you
+can add attributes to the attribute set that can be referenced elsewhere.
diff --git a/nix/modules/ports/default.nix b/nix/modules/ports/default.nix
new file mode 100644
index 0000000..15507e2
--- /dev/null
+++ b/nix/modules/ports/default.nix
@@ -0,0 +1,10 @@
+{ lib, ... }: 
+
+with lib; {
+  options = mkOption {
+	  type = types.attrs;
+	  default = false;
+	  example = true;
+	  description = "Whether to enable this cool module.";
+  };
+}