about summary refs log tree commit diff
path: root/systems/v-coord1/default.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-01-11 22:53:35 +0900
committersefidel <contact@sefidel.net>2024-01-12 00:18:47 +0900
commit4afa6aa625dc8930fe14e9aff0750ff64c5098a8 (patch)
tree04ccd8673e4c8e61a26339dc2543ff4a879aa2ec /systems/v-coord1/default.nix
parentb6df3d14a431ef23c1fe1c138b109028f61e5b74 (diff)
downloadinfra-4afa6aa625dc8930fe14e9aff0750ff64c5098a8.tar.gz
infra-4afa6aa625dc8930fe14e9aff0750ff64c5098a8.zip
feat(systems/v-coord1): configure nebula
Diffstat (limited to 'systems/v-coord1/default.nix')
-rw-r--r--systems/v-coord1/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/systems/v-coord1/default.nix b/systems/v-coord1/default.nix
index ec91e9c..6d97da8 100644
--- a/systems/v-coord1/default.nix
+++ b/systems/v-coord1/default.nix
@@ -61,6 +61,11 @@ in
   time.timeZone = "UTC";
 
   sops.secrets.root-password.neededForUsers = true;
+  # User = networkId;
+  # nameToId = netName: "nebula-${netName}";
+  sops.secrets.nebula-sefidel-internal-ca = { owner = "nebula-sefidel-internal"; };
+  sops.secrets.nebula-sefidel-internal-cert = { owner = "nebula-sefidel-internal"; };
+  sops.secrets.nebula-sefidel-internal-key = { owner = "nebula-sefidel-internal"; };
 
   users.users.root.hashedPasswordFile = config.sops.secrets.root-password.path;
   users.users.root.openssh.authorizedKeys.keys = maintainerKeys;
@@ -78,6 +83,28 @@ in
     sops.enable = true;
 
     services.tailscale.enable = true;
+    services.nebula = {
+      enable = true;
+
+      networks.sefidel-internal = {
+        ca = config.sops.secrets.nebula-sefidel-internal-ca.path;
+        cert = config.sops.secrets.nebula-sefidel-internal-cert.path;
+        key = config.sops.secrets.nebula-sefidel-internal-key.path;
+
+        isLighthouse = true;
+        isRelay = true;
+
+        settings = {
+          lighthouse = {
+            serve_dns = true;
+            dns = {
+              host = "100.64.0.1";
+              port = 53;
+            };
+          };
+        };
+      };
+    };
   };
 
   # This value determines the NixOS release from which the default