init basic topology structure
This commit is contained in:
parent
5b0814a8d7
commit
a9e0d4d500
21 changed files with 281 additions and 4 deletions
hosts
ame
arashi
haru
kariru
kaze
sakura
sora
tsuki
tsuru
yuki
modules
|
@ -3,6 +3,7 @@ _: {
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
../common/fonts.nix
|
../common/fonts.nix
|
||||||
];
|
];
|
||||||
|
|
20
hosts/ame/topology.nix
Normal file
20
hosts/ame/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "ame";
|
||||||
|
hardware.info = "Thinkpad T480";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.108.207.106/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
network = "home";
|
||||||
|
addresses = [""];
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/arashi/topology.nix
Normal file
20
hosts/arashi/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "arashi";
|
||||||
|
hardware.info = "Proxmox VM";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.94.214.100/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.211/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/haru/topology.nix
Normal file
20
hosts/haru/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "haru";
|
||||||
|
hardware.info = "Proxmox VM";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.73.192.45/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.103/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/kariru/topology.nix
Normal file
20
hosts/kariru/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "kariru";
|
||||||
|
hardware.info = "Proxmox VM";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.126.229.95/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.54/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/kaze/topology.nix
Normal file
20
hosts/kaze/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "kaze";
|
||||||
|
hardware.info = "BuyVM VPS";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.69.79.81/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
eth0 = {
|
||||||
|
network = "hetzner";
|
||||||
|
addresses = ["198.98.48.71 "];
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ _: {
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/sakura/topology.nix
Normal file
20
hosts/sakura/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "sakura";
|
||||||
|
hardware.info = "Proxmox VM";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.121.201.47/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.25/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ _: {
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./services
|
./services
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
19
hosts/sora/topology.nix
Normal file
19
hosts/sora/topology.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "sora";
|
||||||
|
hardware.info = "Hetzner VPS";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.104.42.96/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
eth0 = {
|
||||||
|
network = "hetzner";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -22,7 +22,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
monado = {
|
monado = {
|
||||||
enable = true;
|
enable = false;
|
||||||
highPriority = true;
|
highPriority = true;
|
||||||
};
|
};
|
||||||
sunshine = {
|
sunshine = {
|
||||||
|
|
20
hosts/tsuki/topology.nix
Normal file
20
hosts/tsuki/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "tsuki";
|
||||||
|
hardware.info = "Desktop";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.127.30.116/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.47/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/tsuru/topology.nix
Normal file
20
hosts/tsuru/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "tsuru";
|
||||||
|
hardware.info = "Proxmox VM";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.82.146.40/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.99/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./services
|
./services
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./topology.nix
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
20
hosts/yuki/topology.nix
Normal file
20
hosts/yuki/topology.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
_: {
|
||||||
|
topology = {
|
||||||
|
self = {
|
||||||
|
name = "yuki";
|
||||||
|
hardware.info = "Proxmox VM";
|
||||||
|
interfaces = {
|
||||||
|
tailscale0 = {
|
||||||
|
addresses = ["100.108.113.89/32"];
|
||||||
|
network = "tailscale0";
|
||||||
|
type = "wireguard";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
addresses = ["192.168.1.98/24"];
|
||||||
|
network = "home";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,9 +8,78 @@
|
||||||
];
|
];
|
||||||
perSystem = _: {
|
perSystem = _: {
|
||||||
topology.modules = [
|
topology.modules = [
|
||||||
{
|
{inherit (self) nixosConfigurations;}
|
||||||
inherit (self) nixosConfigurations;
|
({config, ...}: let
|
||||||
}
|
inherit
|
||||||
|
(config.lib.topology)
|
||||||
|
mkConnection
|
||||||
|
mkInternet
|
||||||
|
mkRouter
|
||||||
|
;
|
||||||
|
in {
|
||||||
|
networks = {
|
||||||
|
home = {
|
||||||
|
name = "home";
|
||||||
|
cidrv4 = "192.168.0.0/24";
|
||||||
|
};
|
||||||
|
tailscale0 = {
|
||||||
|
name = "tailscale";
|
||||||
|
cidrv4 = "100.0.0.0/32";
|
||||||
|
};
|
||||||
|
hetzner = {
|
||||||
|
name = "hetzner";
|
||||||
|
cidrv4 = "5.161.102.107/24";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
internet = mkInternet {
|
||||||
|
connections = [
|
||||||
|
(mkConnection "hetzner" "wan0")
|
||||||
|
(mkConnection "router" "lan0")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
router = mkRouter "UDM-SE" {
|
||||||
|
info = "UDM-SE";
|
||||||
|
interfaceGroups = [
|
||||||
|
[
|
||||||
|
"eth0"
|
||||||
|
"eth1"
|
||||||
|
"eth2"
|
||||||
|
"eth4"
|
||||||
|
"eth5"
|
||||||
|
"eth6"
|
||||||
|
"eth7"
|
||||||
|
]
|
||||||
|
["lan0"]
|
||||||
|
];
|
||||||
|
connections = {
|
||||||
|
eth0 = mkConnection "ame" "home";
|
||||||
|
eth1 = mkConnection "arashi" "home";
|
||||||
|
eth2 = mkConnection "haru" "home";
|
||||||
|
eth3 = mkConnection "kariru" "home";
|
||||||
|
eth4 = mkConnection "sakura" "home";
|
||||||
|
eth5 = mkConnection "tsuki" "home";
|
||||||
|
eth6 = mkConnection "tsuru" "home";
|
||||||
|
eth7 = mkConnection "yuki" "home";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hetzner = mkRouter "Hetzner" {
|
||||||
|
info = "hetzner edge router";
|
||||||
|
interfaceGroups = [
|
||||||
|
[
|
||||||
|
"eth0"
|
||||||
|
"eth1"
|
||||||
|
]
|
||||||
|
["wan0"]
|
||||||
|
];
|
||||||
|
connections = {
|
||||||
|
eth0 = mkConnection "sora" "eth0";
|
||||||
|
eth1 = mkConnection "kaze" "eth0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue