diff --git a/flake.nix b/flake.nix index 63ec151..d7e0417 100644 --- a/flake.nix +++ b/flake.nix @@ -49,7 +49,8 @@ [ ./hosts/Parzival ] - ++ baseModules; + ++ baseModules + ++ topology; }; ################### # Personal Laptop # @@ -148,6 +149,7 @@ { nixosConfigurations = { WCE-Overseer = self.nixosConfigurations.WCE-Overseer; + Parzival = self.nixosConfigurations.Parzival; }; } ]; diff --git a/hosts/Parzival/default.nix b/hosts/Parzival/default.nix index 140ee15..b7a610d 100644 --- a/hosts/Parzival/default.nix +++ b/hosts/Parzival/default.nix @@ -6,6 +6,7 @@ }: { imports = [ ./hardware-configuration.nix + ./topology-config.nix ../../modules ]; diff --git a/hosts/Parzival/topology-config.nix b/hosts/Parzival/topology-config.nix new file mode 100644 index 0000000..64fdd55 --- /dev/null +++ b/hosts/Parzival/topology-config.nix @@ -0,0 +1,14 @@ +{config, ...}: let + inherit (config.lib.topology) mkInternet mkRouter mkConnection; +in { + topology.self = { + hardware.info = "Primary Desktop"; + interfaces = { + wlan0 = { + addresses = ["192.168.141.1"]; + network = "home"; + physicalConnections = [(mkConnection "router" "wlan0")]; + }; + }; + }; +} diff --git a/hosts/WCE-Overseer/default.nix b/hosts/WCE-Overseer/default.nix index f14a1e3..d392d7a 100644 --- a/hosts/WCE-Overseer/default.nix +++ b/hosts/WCE-Overseer/default.nix @@ -6,6 +6,7 @@ }: { imports = [ ./hardware-configuration.nix + ./topology-config.nix ../../modules ]; diff --git a/hosts/WCE-Overseer/topology-config.nix b/hosts/WCE-Overseer/topology-config.nix new file mode 100644 index 0000000..bb89155 --- /dev/null +++ b/hosts/WCE-Overseer/topology-config.nix @@ -0,0 +1,14 @@ +{config, ...}: let + inherit (config.lib.topology) mkInternet mkRouter mkConnection; +in { + topology.self = { + hardware.info = "ThinkCentre M710q"; + interfaces = { + eth0 = { + addresses = ["192.168.0.30"]; + network = "home"; + physicalConnections = [(mkConnection "router" "eth3")]; + }; + }; + }; +} diff --git a/infrastructure/topology.nix b/infrastructure/topology.nix index 56e7c18..91ed7bd 100644 --- a/infrastructure/topology.nix +++ b/infrastructure/topology.nix @@ -2,13 +2,25 @@ inherit (config.lib.topology) mkInternet mkRouter mkConnection; in { # Define networks/nodes here - networks.home = { - name = "Home Network"; - cidrv4 = "192.168.0.0/16"; - style = { - primaryColor = "#69398b"; - secondaryColor = "#9277ae"; - pattern = "solid"; + networks = { + home = { + name = "Home Network"; + cidrv4 = "192.168.0.0/16"; + style = { + primaryColor = "#69398b"; + secondaryColor = "#9277ae"; + pattern = "solid"; + }; + }; + wce-networks = { + name = "WCE AWS VPC"; + cidrv4 = "172.31.0.0/16"; + cidrv6 = "2600:1f18:22fc:c200::/56"; + style = { + primaryColor = "#FF9900"; + secondaryColor = "#FF9900"; + pattern = "solid"; + }; }; }; @@ -21,6 +33,7 @@ in { interfaceGroups = [ ["wan1"] ["eth1" "eth2" "eth3" "eth4"] + ["wlan0"] ]; }; }