1{ config, ... }:
2let
3 inherit (config.lib.topology) mkInternet mkConnection;
4 mkTS = addresses: {
5 inherit addresses;
6 network = "tailscale";
7 virtual = true;
8 };
9in
10{
11 topology = {
12
13 };
14 nodes.internet = mkInternet {
15 connections = [
16 (mkConnection "marvin" "wlp41s0")
17 (mkConnection "prefect" "enp1s0")
18 (mkConnection "thought" "enp1s0")
19 (mkConnection "zaphod" "wlp1s0")
20 ];
21 };
22 networks.tailscale = {
23 name = "Tailscale";
24 cidrv4 = "100.64.0.0/10";
25 cidrv6 = "fd7a:115c:a1e0::/96";
26 };
27 nodes = {
28 marvin = {
29 interfaces.enp42s0 = {
30 renderer.hidePhysicalConnections = true;
31 };
32 interfaces.tailscale0 =
33 mkTS [
34 "100.123.15.72"
35 "\n"
36 "fd7a:115c:a1e0:ab12:4843:cd96:627b:f48"
37 ]
38 // {
39 physicalConnections = [
40 (mkConnection "prefect" "tailscale0")
41 (mkConnection "marvin" "tailscale0")
42 ];
43 };
44 };
45 zaphod = {
46 interfaces = {
47 vboxnet0.virtual = true;
48 tailscale0 =
49 mkTS [
50 "100.125.9.36"
51 ""
52 "fd7a:115c:a1e0:ab12:4843:cd96:627d:924"
53 ]
54 // {
55 physicalConnections = [
56 (mkConnection "prefect" "tailscale0")
57 (mkConnection "marvin" "tailscale0")
58 ];
59 };
60 };
61 };
62 prefect = {
63 interfaces.tailscale0 =
64 mkTS [
65 "100.93.63.54"
66 "\n"
67 "fd7a:115c:a1e0:ab12:4843:cd96:625d:3f36"
68 ]
69 // {
70 physicalConnections = [
71 (mkConnection "marvin" "tailscale0")
72 (mkConnection "zaphod" "tailscale0")
73 ];
74 };
75 };
76 thought = { };
77 };
78}