mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 17:34:05 -05:00
working on topology
This commit is contained in:
parent
957e86e5e7
commit
5048fb3e79
2 changed files with 37 additions and 2 deletions
13
flake.nix
13
flake.nix
|
|
@ -30,6 +30,9 @@
|
|||
baseModules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
topology = [
|
||||
nix-topology.nixosModules.default
|
||||
];
|
||||
in {
|
||||
|
|
@ -79,7 +82,8 @@
|
|||
[
|
||||
./hosts/WCE-Overseer
|
||||
]
|
||||
++ baseModules;
|
||||
++ baseModules
|
||||
++ topology;
|
||||
};
|
||||
###################################
|
||||
# ISO Installer w/ recovery tools #
|
||||
|
|
@ -140,7 +144,12 @@
|
|||
import nix-topology {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{nixosConfigurations = self.nixosConfigurations;}
|
||||
./infrastructure/topology.nix
|
||||
{
|
||||
nixosConfigurations = {
|
||||
WCE-Overseer = self.nixosConfigurations.WCE-Overseer;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
26
infrastructure/topology.nix
Normal file
26
infrastructure/topology.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{config, ...}: let
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
nodes.internet = mkInternet {
|
||||
connections = mkConnection "router" "wan1";
|
||||
};
|
||||
|
||||
nodes.router = mkRouter "TP-Link" {
|
||||
info = "AX1450 Wi-Fi 6 Router";
|
||||
interfaceGroups = [
|
||||
["wan1"]
|
||||
["eth1" "eth2" "eth3" "eth4"]
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue