aboutsummaryrefslogtreecommitdiff
path: root/nix/topology/default.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-02-08 03:19:30 -0800
committerPreston Pan <ret2pop@gmail.com>2025-02-08 03:19:30 -0800
commit504b765606f02b610d74d259ddf2c85292e1f6c0 (patch)
tree49908b9e9064b0f0fc8bf8070e8cf5cdf547e3a6 /nix/topology/default.nix
parent56faa5e9caf4408c2c4d6df50287c3b1c9e6c1b4 (diff)
add nix-topology; make configuration options less bad; restructure project a bit; add flake system looping
Diffstat (limited to 'nix/topology/default.nix')
-rw-r--r--nix/topology/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/nix/topology/default.nix b/nix/topology/default.nix
new file mode 100644
index 0000000..ce0b3a4
--- /dev/null
+++ b/nix/topology/default.nix
@@ -0,0 +1,59 @@
+{ config, ... }:
+let
+ inherit
+ (config.lib.topology);
+in
+{
+ # Connect node1.lan -> node2.wan
+ nodes = {
+ spontaneity = {
+ interfaces.wan.network = "remote";
+ };
+
+ installer = {
+ interfaces.lan.network = "home";
+ };
+
+ affinity = {
+ interfaces.lan = {
+ network = "home";
+ physicalConnections = [
+ {
+ node = "spontaneity";
+ interface = "wan";
+ }
+ {
+ node = "installer";
+ interface = "lan";
+ }
+ ];
+ };
+ };
+ continuity = {
+ interfaces.lan = {
+ network = "home";
+ physicalConnections = [
+ {
+ node = "spontaneity";
+ interface = "wan";
+ }
+ {
+ node = "affinity";
+ interface = "lan";
+ }
+ ];
+ };
+ };
+ };
+
+ networks = {
+ home = {
+ name = "Home Network";
+ cidrv4 = "192.168.1.1/24";
+ };
+ remote = {
+ name = "Remote Network";
+ cidrv4 = "144.202.27.169/32";
+ };
+ };
+}