From 8da0bbc3ef0d45bd72fa22b6c8963cbda043349b Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 31 Aug 2024 08:33:08 +0700 Subject: [PATCH] :wrench: add some topology information --- flake.lock | 8 ++++---- flake.nix | 1 + machines/cherry/topology.nix | 7 +++++-- machines/chungus/topology.nix | 13 ++++++------- machines/orbi/topology.nix | 15 +++++++-------- nix/topology/networks.nix | 9 ++++++++- 6 files changed, 31 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index fe876c4..a79fb65 100644 --- a/flake.lock +++ b/flake.lock @@ -978,11 +978,11 @@ "treefmt-nix": "treefmt-nix_3" }, "locked": { - "lastModified": 1725014015, - "narHash": "sha256-MFumiomiSQopOPcQgaBsqIRQZ8q2BJiEOm7bGomuu1U=", + "lastModified": 1725067692, + "narHash": "sha256-8DX7yCJi25D11TphmNYitSQN75Iqq4LFp7QrEPwkhWY=", "ref": "main", - "rev": "8a828064a794b75eb2459c6be499bef740c32721", - "revCount": 74, + "rev": "e4f6bc36615dd9c32ed2d007b6bc8a4e8fa2275d", + "revCount": 75, "type": "git", "url": "ssh://forgejo@git.ingolf-wagner.de/palo/nixos-private-parts.git" }, diff --git a/flake.nix b/flake.nix index c0344ee..10eb631 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ polygon-art.url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git"; private-parts.inputs.nixpkgs.follows = "nixpkgs"; # only private input private-parts.url = "git+ssh://forgejo@git.ingolf-wagner.de/palo/nixos-private-parts.git?ref=main"; + #private-parts.url = "git+file:///home/palo/dev/nixos/nixos-private-parts"; retiolum.url = "github:Mic92/retiolum"; srvos.url = "github:nix-community/srvos"; stylix.inputs.home-manager.follows = "home-manager"; diff --git a/machines/cherry/topology.nix b/machines/cherry/topology.nix index 59218f3..24da1a0 100644 --- a/machines/cherry/topology.nix +++ b/machines/cherry/topology.nix @@ -3,13 +3,16 @@ with config.lib.topology; { topology.self = { + interfaces.wifi = { + network = "home"; + }; interfaces.wg0 = { network = "wg0"; - type = "ethernet"; + type = "wireguard"; virtual = true; }; interfaces.ztbn67ogn2 = { - network = "wg0"; + network = "zerotier"; type = "ethernet"; virtual = true; }; diff --git a/machines/chungus/topology.nix b/machines/chungus/topology.nix index 8bda2bb..1b84aac 100644 --- a/machines/chungus/topology.nix +++ b/machines/chungus/topology.nix @@ -3,29 +3,28 @@ with config.lib.topology; { topology.self = { - interfaces.enp0s31f6 = { + interfaces.eth0 = { network = "home"; - type = "ethernet"; }; interfaces.wg0 = { addresses = [ "10.100.0.2" ]; network = "wg0"; - type = "ethernet"; + type = "wireguard"; virtual = true; }; interfaces.ztbn67ogn2 = { - network = "wg0"; - type = "ethernet"; + network = "zerotier"; + # type = "zerotier"; virtual = true; }; interfaces."tinc.private" = { network = "tinc.private"; - type = "ethernet"; + # type = "tinc"; virtual = true; }; interfaces."tinc.retiolum" = { network = "tinc.retiolum"; - type = "ethernet"; + # type = "tinc"; virtual = true; }; diff --git a/machines/orbi/topology.nix b/machines/orbi/topology.nix index 24e8306..900df81 100644 --- a/machines/orbi/topology.nix +++ b/machines/orbi/topology.nix @@ -3,24 +3,23 @@ with config.lib.topology; { topology.self = { - # interfaces.enp0s31f6 = { - # network = "home"; # internet - # type = "ethernet"; - # }; + interfaces.eth0 = { + physicalConnections = [ (mkConnection "internet" "*") ]; + }; interfaces.wg0 = { addresses = [ "10.100.0.1" ]; network = "wg0"; - type = "ethernet"; + type = "wireguard"; virtual = true; }; interfaces.ztbn67ogn2 = { - network = "wg0"; - type = "ethernet"; + network = "zerotier"; + # type = "zerotier"; virtual = true; }; interfaces."tinc.private" = { network = "tinc.private"; - type = "ethernet"; + # type = "tinc"; virtual = true; }; diff --git a/nix/topology/networks.nix b/nix/topology/networks.nix index e7a3eb4..9671e1c 100644 --- a/nix/topology/networks.nix +++ b/nix/topology/networks.nix @@ -2,6 +2,14 @@ with config.lib.topology; { + nodes.internet = mkInternet { + #connections = mkConnection "orbi" "eth0"; + }; + + networks.zerotier = { + name = "clan network"; + }; + networks.wg0 = { name = "wg0"; cidrv4 = "10.100.0.0/24"; @@ -14,7 +22,6 @@ with config.lib.topology; networks."tinc.retiolum" = { name = "tinc retiolum"; - #cidrv4 = "192.168.0.0/24"; }; }