mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat: add more topology documentation
This commit is contained in:
parent
34efe5686e
commit
ed729c4073
7 changed files with 56 additions and 7 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -1012,11 +1012,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks_3"
|
"pre-commit-hooks": "pre-commit-hooks_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712180264,
|
"lastModified": 1712186793,
|
||||||
"narHash": "sha256-OcRVcS5uv+KD9Ii45MzwO2vNhOuL9Uzs+CIWL2zvatU=",
|
"narHash": "sha256-ZEXCm57Mvs3B2E6OlaZ+j+tyd+vuubP/aL1Rn09kSek=",
|
||||||
"owner": "oddlama",
|
"owner": "oddlama",
|
||||||
"repo": "nix-topology",
|
"repo": "nix-topology",
|
||||||
"rev": "0d0fa39b45c62d13de9db07a8d06d400acd9133d",
|
"rev": "c2092f877d67bfacc8f8a403db72b7bf61a6db4d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -32,4 +32,6 @@
|
||||||
font = "ter-v28n";
|
font = "ter-v28n";
|
||||||
packages = [pkgs.terminus_font];
|
packages = [pkgs.terminus_font];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
topology.self.icon = "devices.laptop";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
boot.initrd.availableKernelModules = ["virtio_pci" "virtio_net" "virtio_scsi" "virtio_blk"];
|
boot.initrd.availableKernelModules = ["virtio_pci" "virtio_net" "virtio_scsi" "virtio_blk"];
|
||||||
|
topology.self.icon = "devices.cloud-server";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
inherit
|
inherit
|
||||||
(config.lib.topology)
|
(config.lib.topology)
|
||||||
mkInternet
|
mkInternet
|
||||||
|
mkDevice
|
||||||
mkSwitch
|
mkSwitch
|
||||||
mkRouter
|
mkRouter
|
||||||
mkConnection
|
mkConnection
|
||||||
mkConnectionRev
|
|
||||||
;
|
;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -14,8 +14,12 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
nodes.internet = mkInternet {};
|
nodes.internet = mkInternet {
|
||||||
nodes.sentinel.interfaces.wan.physicalConnections = [(mkConnectionRev "internet" "*")];
|
connections = [
|
||||||
|
(mkConnection "sentinel" "wan")
|
||||||
|
(mkConnection "fritzbox" "wan1")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
nodes.fritzbox = mkRouter "FritzBox" {
|
nodes.fritzbox = mkRouter "FritzBox" {
|
||||||
info = "FRITZ!Box 7520";
|
info = "FRITZ!Box 7520";
|
||||||
|
@ -25,7 +29,7 @@ in {
|
||||||
["wan1"]
|
["wan1"]
|
||||||
];
|
];
|
||||||
connections.eth1 = mkConnection "ward" "wan";
|
connections.eth1 = mkConnection "ward" "wan";
|
||||||
connections.wan1 = mkConnectionRev "internet" "*";
|
interfaces.eth1.addresses = ["192.168.178.1"];
|
||||||
};
|
};
|
||||||
|
|
||||||
networks.home-fritzbox = {
|
networks.home-fritzbox = {
|
||||||
|
@ -49,5 +53,47 @@ in {
|
||||||
connections.eth1 = mkConnection "switch-attic" "eth3";
|
connections.eth1 = mkConnection "switch-attic" "eth3";
|
||||||
connections.eth2 = mkConnection "kroma" "lan1";
|
connections.eth2 = mkConnection "kroma" "lan1";
|
||||||
connections.eth3 = mkConnection "nom" "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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
topology/images/epson-xp-7100.png
Normal file
BIN
topology/images/epson-xp-7100.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 148 KiB |
BIN
topology/images/mennekes-wallbox.png
Normal file
BIN
topology/images/mennekes-wallbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
BIN
topology/images/ruckus-r500.png
Normal file
BIN
topology/images/ruckus-r500.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
Loading…
Add table
Add a link
Reference in a new issue