From 4f9680966bc37fee100970f6fa1fc028e979f8ca Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 24 Oct 2023 23:39:00 +0200 Subject: [PATCH] hosts: remove hyprspace static address support, create vstub everywhere, route vstub through hyprspace --- hosts/VEGAS/default.nix | 5 ++--- hosts/checkmate/default.nix | 10 ++++++++-- hosts/options/hour/hyprspace.nix | 5 ----- hosts/part.nix | 4 ++-- hosts/prophet/default.nix | 10 ++++++++-- hosts/thunderskin/default.nix | 10 ++++++++-- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/hosts/VEGAS/default.nix b/hosts/VEGAS/default.nix index 34fefff..6fbf4c2 100644 --- a/hosts/VEGAS/default.nix +++ b/hosts/VEGAS/default.nix @@ -1,4 +1,4 @@ -tools: { +tools: rec { ssh.enable = true; ssh.id = with tools.dns; { publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICz2nGA+Y4OxhMKsV6vKIns3hOoBkK557712h7FfWXcE"; @@ -19,10 +19,9 @@ tools: { hyprspace = { enable = true; id = "QmYs4xNBby2fTs8RnzfXEk161KD4mftBfCiR8yXtgGPj4J"; - addr = "10.100.3.5"; listenPort = 995; routes = [ - "10.1.0.1/32" + "${interfaces.vstub.addr}/32" "10.10.0.0/16" ]; }; diff --git a/hosts/checkmate/default.nix b/hosts/checkmate/default.nix index f6f6554..780918b 100644 --- a/hosts/checkmate/default.nix +++ b/hosts/checkmate/default.nix @@ -1,4 +1,4 @@ -tools: { +tools: rec { ssh.enable = true; ssh.id = with tools.dns; { publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINImnMfEzUBU5qiuu05DMPrddTGypOtr+cL1/yQN2GFn"; @@ -11,13 +11,19 @@ tools: { addrPublic = "152.67.73.164"; link = "ens3"; }; + vstub = { + addr = "10.1.0.32"; + link = "vstub"; + }; }; hyprspace = { enable = true; id = "12D3KooWL84sAtq1QTYwb7gVbhSNX5ZUfVt4kgYKz8pdif1zpGUh"; - addr = "10.100.3.32"; listenPort = 995; + routes = [ + "${interfaces.vstub.addr}/32" + ]; }; enterprise = { diff --git a/hosts/options/hour/hyprspace.nix b/hosts/options/hour/hyprspace.nix index acaaa93..4814599 100644 --- a/hosts/options/hour/hyprspace.nix +++ b/hosts/options/hour/hyprspace.nix @@ -10,11 +10,6 @@ with lib; type = types.str; }; - addr = mkOption { - description = "Hyprspace internal IP address."; - type = types.str; - }; - routes = mkOption { description = "Networks to export to Hyprspace."; type = with types; listOf str; diff --git a/hosts/part.nix b/hosts/part.nix index 16ccbb7..5396fba 100644 --- a/hosts/part.nix +++ b/hosts/part.nix @@ -29,13 +29,13 @@ in with tools.dns; TITAN.hyprspace = { enable = true; id = "QmfJ5Tv2z9jFv9Aocevyn6QqRcfm9eYQZhvYvmAVfACfuM"; - addr = "10.100.3.7"; + # addr = "10.100.3.7"; }; jericho.hyprspace = { enable = true; id = "QmccBLgGP3HR36tTkwSYZX3KDv2EXb1MvYwGVs6PbpbHv9"; - addr = "10.100.3.13"; + # addr = "10.100.3.13"; }; }; }; diff --git a/hosts/prophet/default.nix b/hosts/prophet/default.nix index 180b338..43982bb 100644 --- a/hosts/prophet/default.nix +++ b/hosts/prophet/default.nix @@ -1,4 +1,4 @@ -tools: { +tools: rec { ssh.enable = true; ssh.id = with tools.dns; { publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAUG/ubwo68tt2jMP5ia0Sa4mnkWtlKVN5n4Y50U2nTC"; @@ -11,13 +11,19 @@ tools: { addrPublic = "152.67.75.145"; link = "enp0s6"; }; + vstub = { + addr = "10.1.0.9"; + link = "vstub"; + }; }; hyprspace = { enable = true; id = "QmbrAHuh4RYcyN9fWePCZMVmQjbaNXtyvrDCWz4VrchbXh"; - addr = "10.100.3.9"; listenPort = 995; + routes = [ + "${interfaces.vstub.addr}/32" + ]; }; enterprise = { diff --git a/hosts/thunderskin/default.nix b/hosts/thunderskin/default.nix index 8bcbdd4..c675bb2 100644 --- a/hosts/thunderskin/default.nix +++ b/hosts/thunderskin/default.nix @@ -1,4 +1,4 @@ -tools: { +tools: rec { ssh.enable = true; ssh.id = with tools.dns; { publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGV8TbMvGXfAp9R2I9GdR7aLlGjxh2CW1pCZjQSB4TJp"; @@ -11,13 +11,19 @@ tools: { addrPublic = "140.238.208.154"; link = "ens3"; }; + vstub = { + addr = "10.1.0.4"; + link = "vstub"; + }; }; hyprspace = { enable = true; id = "12D3KooWB9AUPorFoACkWbphyargRBV9osJsYuQDumtQ85j7Aqmg"; - addr = "10.100.3.4"; listenPort = 995; + routes = [ + "${interfaces.vstub.addr}/32" + ]; }; enterprise = {