🔧 add some topology information

This commit is contained in:
Ingolf Wagner 2024-08-30 17:34:57 +07:00
parent 55c2e14337
commit 1564bd8d72
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
10 changed files with 114 additions and 5 deletions

View file

@ -978,11 +978,11 @@
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1724916929,
"narHash": "sha256-QM8qdmnENvNGvfhLv0LsQsZgIot75Q7R8QV0Mm5I5yM=",
"lastModified": 1725014015,
"narHash": "sha256-MFumiomiSQopOPcQgaBsqIRQZ8q2BJiEOm7bGomuu1U=",
"ref": "main",
"rev": "82083225da7402d2bde9cfd3172374a96429b579",
"revCount": 72,
"rev": "8a828064a794b75eb2459c6be499bef740c32721",
"revCount": 74,
"type": "git",
"url": "ssh://forgejo@git.ingolf-wagner.de/palo/nixos-private-parts.git"
},

View file

@ -342,7 +342,7 @@
clan-core.flakeModules.default
./nix/formatter.nix
./nix/packages
./nix/topology.nix
./nix/topology
];
# Define your clan

View file

@ -18,6 +18,7 @@
./network-wireguard-wg1.nix
./37c3.nix
./topology.nix
];

View file

@ -0,0 +1,22 @@
{ config, ... }:
with config.lib.topology;
{
topology.self = {
interfaces.wg0 = {
network = "wg0";
type = "ethernet";
virtual = true;
};
interfaces.ztbn67ogn2 = {
network = "wg0";
type = "ethernet";
virtual = true;
};
interfaces."tinc.private" = {
network = "tinc.private";
type = "ethernet";
virtual = true;
};
};
}

View file

@ -52,6 +52,8 @@
./zerotier-controller.nix
./topology.nix
];
components.gui.enable = false;

View file

@ -0,0 +1,33 @@
{ config, ... }:
with config.lib.topology;
{
topology.self = {
interfaces.enp0s31f6 = {
network = "home";
type = "ethernet";
};
interfaces.wg0 = {
addresses = [ "10.100.0.2" ];
network = "wg0";
type = "ethernet";
virtual = true;
};
interfaces.ztbn67ogn2 = {
network = "wg0";
type = "ethernet";
virtual = true;
};
interfaces."tinc.private" = {
network = "tinc.private";
type = "ethernet";
virtual = true;
};
interfaces."tinc.retiolum" = {
network = "tinc.retiolum";
type = "ethernet";
virtual = true;
};
};
}

View file

@ -41,6 +41,8 @@
#./social-jitsi.nix
./social-matrix-terranix.nix
./topology.nix
];
services.logrotate.checkConfig = false; # because uid 3000 does not exist in here

View file

@ -0,0 +1,28 @@
{ config, ... }:
with config.lib.topology;
{
topology.self = {
# interfaces.enp0s31f6 = {
# network = "home"; # internet
# type = "ethernet";
# };
interfaces.wg0 = {
addresses = [ "10.100.0.1" ];
network = "wg0";
type = "ethernet";
virtual = true;
};
interfaces.ztbn67ogn2 = {
network = "wg0";
type = "ethernet";
virtual = true;
};
interfaces."tinc.private" = {
network = "tinc.private";
type = "ethernet";
virtual = true;
};
};
}

View file

@ -31,6 +31,7 @@
overlays = [ inputs.nix-topology.overlays.default ];
};
topology.modules = [
./networks.nix
{
# Inline module to inform topology of your existing NixOS hosts.
}

20
nix/topology/networks.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, ... }:
with config.lib.topology;
{
networks.wg0 = {
name = "wg0";
cidrv4 = "10.100.0.0/24";
};
networks."tinc.private" = {
name = "tinc private";
cidrv4 = "10.23.42.0/24";
};
networks."tinc.retiolum" = {
name = "tinc retiolum";
#cidrv4 = "192.168.0.0/24";
};
}