mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-12-29 20:08:22 +01:00
topology: add a bunch of non-nixos machines
This commit is contained in:
@@ -10,6 +10,10 @@ let
|
||||
mkConnectionRev;
|
||||
values = import ../values.nix;
|
||||
in {
|
||||
imports = [
|
||||
./non-nixos-machines.nix
|
||||
];
|
||||
|
||||
### Networks
|
||||
|
||||
networks.pvv = {
|
||||
@@ -29,6 +33,8 @@ in {
|
||||
|
||||
networks.ntnu = {
|
||||
name = "NTNU";
|
||||
cidrv4 = values.ntnu.ipv4-space;
|
||||
cidrv6 = values.ntnu.ipv6-space;
|
||||
};
|
||||
|
||||
nodes.internet = mkInternet {
|
||||
@@ -54,17 +60,30 @@ in {
|
||||
nodes.brus-switch = mkSwitch "Brus Switch" {
|
||||
interfaceGroups = [ (lib.genList (i: "eth${toString i}") 16) ];
|
||||
|
||||
connections.eth2 = mkConnection "bekkalokk" "enp2s0";
|
||||
# connections.eth3 = mkConnection "bicep" "enp6s0f0";
|
||||
connections.eth4 = mkConnection "buskerud" "eth1";
|
||||
connections.eth5 = mkConnection "knutsen" "eth1";
|
||||
connections.eth6 = mkConnection "powerpuff-cluster" "eth1";
|
||||
|
||||
connections.eth8 = mkConnection "lupine-1" "enp0s31f6";
|
||||
connections.eth9 = mkConnection "lupine-2" "enp0s31f6";
|
||||
connections.eth11 = mkConnection "lupine-3" "enp0s31f6";
|
||||
connections.eth10 = mkConnection "lupine-4" "enp0s31f6";
|
||||
connections.eth12 = mkConnection "lupine-5" "enp0s31f6";
|
||||
connections = let
|
||||
connections' = [
|
||||
(mkConnection "bekkalokk" "enp2s0")
|
||||
# (mkConnection "bicep" "enp6s0f0")
|
||||
(mkConnection "buskerud" "eth1")
|
||||
(mkConnection "knutsen" "eth1")
|
||||
(mkConnection "powerpuff-cluster" "eth1")
|
||||
(mkConnection "lupine-1" "enp0s31f6")
|
||||
(mkConnection "lupine-2" "enp0s31f6")
|
||||
(mkConnection "lupine-3" "enp0s31f6")
|
||||
(mkConnection "lupine-4" "enp0s31f6")
|
||||
(mkConnection "lupine-5" "enp0s31f6")
|
||||
(mkConnection "innovation" "em0")
|
||||
(mkConnection "microbel" "eth0")
|
||||
# (mkConnection "isvegg" "")
|
||||
# (mkConnection "ameno" "")
|
||||
# (mkConnection "sleipner" "")
|
||||
];
|
||||
in builtins.listToAttrs (
|
||||
lib.zipListsWith
|
||||
(a: b: lib.nameValuePair a b)
|
||||
(lib.genList (i: "eth${toString i}") 16)
|
||||
connections'
|
||||
);
|
||||
};
|
||||
|
||||
nodes.knutsen = mkRouter "knutsen" {
|
||||
|
||||
75
topology/non-nixos-machines.nix
Normal file
75
topology/non-nixos-machines.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.lib.topology) mkDevice;
|
||||
in {
|
||||
nodes.balduzius = mkDevice "balduzius" {
|
||||
guestType = "proxmox";
|
||||
parent = config.nodes.powerpuff-cluster.id;
|
||||
};
|
||||
nodes.tom = mkDevice "tom" {
|
||||
guestType = "proxmox";
|
||||
parent = config.nodes.powerpuff-cluster.id;
|
||||
};
|
||||
nodes.hildring = mkDevice "hildring" {
|
||||
guestType = "proxmox";
|
||||
parent = config.nodes.powerpuff-cluster.id;
|
||||
};
|
||||
nodes.microbel = mkDevice "microbel" {
|
||||
interfaceGroups = [ [ "eth0" ] ];
|
||||
};
|
||||
nodes.innovation = mkDevice "innovation" {
|
||||
hardware.info = "Dell Optiplex 9010";
|
||||
interfaceGroups = [ [ "em0" ] ];
|
||||
interfaces.em0 = {
|
||||
mac = "18:03:73:20:18:d3";
|
||||
addresses = [
|
||||
"129.241.210.214"
|
||||
"2001:700:300:1900::1:56"
|
||||
];
|
||||
gateways = [
|
||||
"129.241.210.129"
|
||||
"2001:700:300:1900::1"
|
||||
];
|
||||
};
|
||||
services = {
|
||||
minecraft = {
|
||||
name = "Minecraft";
|
||||
icon = "services.minecraft";
|
||||
info = "minecraft.pvv.ntnu.no";
|
||||
details.listen.text = "0.0.0.0:25565";
|
||||
};
|
||||
};
|
||||
};
|
||||
nodes.principal = mkDevice "principal" {
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.sleipner = mkDevice "sleipner" {
|
||||
interfaceGroups = [ [ "eno0" "enp2s0" ] ];
|
||||
};
|
||||
nodes.isvegg = mkDevice "isvegg" {
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.ameno = mkDevice "ameno" {
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.skrott = mkDevice "skrott" {
|
||||
deviceType = "terminal";
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.torskas = mkDevice "torskas" {
|
||||
deviceType = "terminal";
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.wegonke = mkDevice "wegonke" {
|
||||
deviceType = "terminal";
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.demiurgen = mkDevice "demiurgen" {
|
||||
deviceType = "terminal";
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
nodes.sanctuary = mkDevice "sanctuary" {
|
||||
deviceType = "terminal";
|
||||
interfaceGroups = [ [ ] ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user