From 9a5044959f869600e70bb00a3e93a77348b34e14 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Sun, 20 Jul 2025 12:46:14 -0500 Subject: [PATCH] ... --- .gitignore | 1 - test/meta.nix | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+), 1 deletion(-) delete mode 100644 .gitignore create mode 100644 test/meta.nix diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a1c711e..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -meta.nix \ No newline at end of file diff --git a/test/meta.nix b/test/meta.nix new file mode 100644 index 0000000..1353a6c --- /dev/null +++ b/test/meta.nix @@ -0,0 +1,183 @@ +{ + locations = { + cloud = { + owner = "yaro"; + subnets = { + dmz = { + systems = { + janus = { + primary = true; + macAddresses = [ "AA:BB:CC:DD:EE:FF" ]; + }; + }; + }; + main = { + systems = { + metatron = { + primary = true; + macAddresses = [ "11:22:33:44:55:66" ]; + }; + }; + }; + }; + }; + home = { + owner = "yaro"; + subnets = { + open = { + managed = false; + systems = { + io = { + useDHCP = true; + macAddresses = [ "DD:DD:DD:DD:DD:DD" ]; + }; + }; + }; + dmz = { + isVLAN = true; + systems = { + io = { + primary = true; + macAddresses = [ "12:34:56:78:9A:BC" ]; + }; + europa = { + macAddresses = [ "FE:DC:BA:98:76:54" ]; + }; + deimos = { + primary = true; + macAddresses = [ "AA:AA:AA:AA:AA:AA" ]; + }; + }; + }; + main = { + users = [ + "alice" + "bob" + ]; + isVLAN = true; + systems = { + europa = { + primary = true; + macAddresses = [ "BB:BB:BB:BB:BB:BB" ]; + }; + phobos = { + primary = true; + macAddresses = [ "CC:CC:CC:CC:CC:CC" ]; + }; + terra = { + primary = true; + macAddresses = [ "EE:EE:EE:EE:EE:EE" ]; + }; + }; + }; + }; + }; + }; + + systems = { + janus = { + owner = "yaro"; + nixOS = true; + role = "infrastructure"; + tags = [ "router" "linode" ]; + services = [ "nginx-proxy" "headscale" ]; + config = { ... }: { + # NixOS config here, or use a path to one. + }; + }; + metatron = { + owner = "yaro"; + nixOS = true; + role = "server"; + tags = [ "server" "linode" "upstream" ]; + config = { ... }: { + # NixOS config here, or use a path to one. + }; + }; + io = { + owner = "yaro"; + nixOS = true; + role = "infrastructure"; + tags = [ "router" "downstream" ]; + config = { ... }: { + # NixOS config here, or use a path to one. + }; + }; + europa = { + owner = "yaro"; + nixOS = true; + role = "infrastructure"; + tags = [ "router" "downstream" ]; + config = { ... }: { + # NixOS config here, or use a path to one. + }; + }; + deimos = { + owner = "yaro"; + nixOS = true; + role = "server"; + tags = [ "server" ]; + servicesPlane = "janus"; + hostPlane = "deimos"; + services = [ + "nextcloud" + "yaro-site" + "vaultwarden" + "jellyfin" + "forgejo" + "headscale" + ]; + config = { ... }: { + # NixOS config here, or use a path to one. + }; + }; + phobos = { + owner = "yaro"; + nixOS = true; + role = "server"; + tags = [ "server" ]; + servicesPlane = "deimos"; + services = [ + "mosquitto" + "home-assistant" + "sandbox" + "node-red" + ]; + config = { ... }: { + # NixOS config here, or use a path to one. + }; + }; + terra = { + owner = "yaro"; + nixOS = false; + role = "infrastructure"; + }; + }; + + users = { + yaro = { }; + alice = { }; + bob = { }; + }; + + group = { + userGroups = { + programmers = { + config = { ... }: { + # Home-manager config here, or use a path to one. + }; + }; + }; + systemGroups = { + storage = { + services = [ + "nfs" + "isci" + ]; + config = { ... }: { + # Home-manager config here, or use a path to one. + }; + }; + }; + }; +}