diff --git a/flake.lock b/flake.lock index d7622f3..6c7fa42 100644 --- a/flake.lock +++ b/flake.lock @@ -1012,11 +1012,11 @@ "pre-commit-hooks": "pre-commit-hooks_3" }, "locked": { - "lastModified": 1712180264, - "narHash": "sha256-OcRVcS5uv+KD9Ii45MzwO2vNhOuL9Uzs+CIWL2zvatU=", + "lastModified": 1712186793, + "narHash": "sha256-ZEXCm57Mvs3B2E6OlaZ+j+tyd+vuubP/aL1Rn09kSek=", "owner": "oddlama", "repo": "nix-topology", - "rev": "0d0fa39b45c62d13de9db07a8d06d400acd9133d", + "rev": "c2092f877d67bfacc8f8a403db72b7bf61a6db4d", "type": "github" }, "original": { diff --git a/hosts/nom/default.nix b/hosts/nom/default.nix index 87b6247..b137a5c 100644 --- a/hosts/nom/default.nix +++ b/hosts/nom/default.nix @@ -32,4 +32,6 @@ font = "ter-v28n"; packages = [pkgs.terminus_font]; }; + + topology.self.icon = "devices.laptop"; } diff --git a/modules/optional/hardware/hetzner-cloud.nix b/modules/optional/hardware/hetzner-cloud.nix index 7558c0c..6359204 100644 --- a/modules/optional/hardware/hetzner-cloud.nix +++ b/modules/optional/hardware/hetzner-cloud.nix @@ -1,3 +1,4 @@ { boot.initrd.availableKernelModules = ["virtio_pci" "virtio_net" "virtio_scsi" "virtio_blk"]; + topology.self.icon = "devices.cloud-server"; } diff --git a/topology/default.nix b/topology/default.nix index 10fad11..42184a1 100644 --- a/topology/default.nix +++ b/topology/default.nix @@ -2,10 +2,10 @@ inherit (config.lib.topology) mkInternet + mkDevice mkSwitch mkRouter mkConnection - mkConnectionRev ; in { imports = [ @@ -14,8 +14,12 @@ in { } ]; - nodes.internet = mkInternet {}; - nodes.sentinel.interfaces.wan.physicalConnections = [(mkConnectionRev "internet" "*")]; + nodes.internet = mkInternet { + connections = [ + (mkConnection "sentinel" "wan") + (mkConnection "fritzbox" "wan1") + ]; + }; nodes.fritzbox = mkRouter "FritzBox" { info = "FRITZ!Box 7520"; @@ -25,7 +29,7 @@ in { ["wan1"] ]; connections.eth1 = mkConnection "ward" "wan"; - connections.wan1 = mkConnectionRev "internet" "*"; + interfaces.eth1.addresses = ["192.168.178.1"]; }; networks.home-fritzbox = { @@ -49,5 +53,47 @@ in { connections.eth1 = mkConnection "switch-attic" "eth3"; connections.eth2 = mkConnection "kroma" "lan1"; connections.eth3 = mkConnection "nom" "lan1"; + connections.eth4 = mkConnection "switch-livingroom" "eth1"; + }; + + nodes.switch-livingroom = mkSwitch "Switch Livingroom" { + info = "D-Link DGS-105"; + image = ./images/dlink-dgs105.png; + interfaceGroups = [["eth1" "eth2" "eth3" "eth4" "eth5"]]; + connections.eth2 = mkConnection "tv-livingroom" "eth1"; + }; + + nodes.tv-livingroom = mkDevice "Livingroom TV" { + # TODO info + # image = ./images/epson-xp-7100.png; + interfaces.eth1 = {}; + }; + + nodes.ruckus-ap = mkSwitch "Wi-Fi AP" { + info = "Ruckus R500"; + image = ./images/ruckus-r500.png; + interfaceGroups = [["eth1" "wifi"]]; + connections.eth1 = mkConnection "switch-attic" "eth4"; + }; + + nodes.printer = mkDevice "Printer Attic" { + info = "Epson XP-7100"; + image = ./images/epson-xp-7100.png; + connections.eth1 = mkConnection "switch-attic" "eth5"; + }; + + nodes.dect-repeater = mkSwitch "DECT Repeater" { + info = "FRITZ!Box 7490"; + image = ./images/fritzbox.png; + interfaceGroups = [ + ["eth1" "eth2" "eth3" "eth4"] + ]; + connections.eth1 = mkConnection "switch-attic" "eth6"; + }; + + nodes.wallbox = mkDevice "Wallbox" { + info = "Mennekes Amtron"; + image = ./images/mennekes-wallbox.png; + connections.eth1 = mkConnection "dect-repeater" "eth2"; }; } diff --git a/topology/images/epson-xp-7100.png b/topology/images/epson-xp-7100.png new file mode 100644 index 0000000..3c297d2 Binary files /dev/null and b/topology/images/epson-xp-7100.png differ diff --git a/topology/images/mennekes-wallbox.png b/topology/images/mennekes-wallbox.png new file mode 100644 index 0000000..d17fafa Binary files /dev/null and b/topology/images/mennekes-wallbox.png differ diff --git a/topology/images/ruckus-r500.png b/topology/images/ruckus-r500.png new file mode 100644 index 0000000..ca2d3e8 Binary files /dev/null and b/topology/images/ruckus-r500.png differ