mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 14:50:40 +02:00
fix(topology): work around network propagator not knowing about mkMerge
This commit is contained in:
parent
1d207e0fd2
commit
beb50045b4
8 changed files with 26 additions and 27 deletions
|
@ -210,17 +210,12 @@
|
|||
connections.wan1 = mkConnectionRev "internet" "*";
|
||||
};
|
||||
|
||||
# TODO: extract from kea!
|
||||
networks.home-lan = {
|
||||
name = "Home LAN";
|
||||
cidrv4 = "192.168.1.0/24";
|
||||
};
|
||||
|
||||
networks.home-fritzbox = {
|
||||
name = "Home Fritzbox";
|
||||
cidrv4 = "192.168.178.0/24";
|
||||
};
|
||||
|
||||
networks.ward-kea.name = "Home LAN";
|
||||
nodes.switch-attic = mkSwitch "Switch Attic" {
|
||||
info = "D-Link DGS-1016D";
|
||||
image = ./dlink-dgs1016d.png;
|
||||
|
@ -240,7 +235,6 @@
|
|||
};
|
||||
})
|
||||
{
|
||||
nodes.ward.interfaces.lan.network = "home-lan";
|
||||
nodes.fritzbox.interfaces.eth1.network = "home-fritzbox";
|
||||
}
|
||||
];
|
||||
|
|
|
@ -79,6 +79,4 @@
|
|||
];
|
||||
|
||||
topology.self.icon = "devices.desktop";
|
||||
#topology.self.interfaces.lan1.connections = [{ id = "dumbswitch"; interface = "lan1"; }];
|
||||
#topology.nodes.dumbswitch = lib.topology.mkSwitch "Dummer Switch";
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
topology.self.hardware.info = "AMD Ryzen Threadripper 1950X, 96GB RAM";
|
||||
topology.self.interfaces.lan.sharesNetworkWith = x: x == "lan-self";
|
||||
topology.self.interfaces.lan-self.sharesNetworkWith = x: x == "lan";
|
||||
|
||||
boot.mode = "efi";
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "e1000e" "alx"];
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
topology.self.hardware.image = ../../odroid-h3.png;
|
||||
topology.self.hardware.info = "ODROID H3, 64GB RAM";
|
||||
topology.self.interfaces.lan.sharesNetworkWith = x: x == "lan-self";
|
||||
topology.self.interfaces.lan-self.sharesNetworkWith = x: x == "lan";
|
||||
|
||||
boot.mode = "efi";
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" "r8169"];
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
## TODO
|
||||
|
||||
- macvtap interface type svg with small link
|
||||
- address port label render make newline capable (multiple port labels)
|
||||
- NAT indication
|
||||
- embed font globally, try removing satori embed?
|
||||
- network centric view as standalone
|
||||
- make rectpacking of childs
|
||||
|
||||
- podman / docker harvesting
|
||||
- nixos-container extractor
|
||||
|
||||
- disks (from disko) + render
|
||||
- impermanence render?
|
||||
- nixos nftables firewall render?
|
||||
|
||||
- search todo and do
|
||||
- the network propagator based on options.nodes cannot deal with mkMerge and mkIf stuff currently
|
||||
|
||||
## Options
|
||||
|
||||
## Renderers
|
||||
|
|
|
@ -29,6 +29,8 @@ in {
|
|||
cidrv4 = subnet;
|
||||
};
|
||||
|
||||
topology.self.interfaces = genAttrs interfaces (const {network = netName;});
|
||||
# Do not use topology.self.interfaces here to prevent inclusion of a mkMerge which cannot be
|
||||
# detected by the network propagator currently.
|
||||
topology.nodes.${config.topology.id}.interfaces = genAttrs interfaces (const {network = netName;});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
|
||||
# Edge in network-centric view
|
||||
(optionalAttrs (interface.network != null) (
|
||||
mkEdge ("children.network." + idForInterface node interface.id) "children.network.children.net:${interface.network}.ports.default" false {
|
||||
mkEdge ("children.network." + idForInterface node interface.id) "children.network.children.net:${interface.network}.ports.default" interface.virtual {
|
||||
style = pathStyleFromNetworkStyle config.networks.${interface.network}.style;
|
||||
}
|
||||
))
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
# TODO:
|
||||
# - macvtap interface type svg with small link
|
||||
# - address port label render make newline capable (multiple port labels)
|
||||
# - NAT indication
|
||||
# - embed font globally, try removing satori embed?
|
||||
# - network overview card (list all networks with name and cidr, legend style)
|
||||
# - network centric view as standalone
|
||||
# - split network layout or make rectpacking of childs
|
||||
# - more service info
|
||||
# - disks (from disko) + render
|
||||
# - impermanence render?
|
||||
# - nixos nftables firewall render?
|
||||
# - podman / docker harvesting
|
||||
# - systemd extractor remove cidr mask
|
||||
# - nixos-container extractor
|
||||
# - search todo and do
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue