router: add host configurations for test routers

This commit is contained in:
Yuri Tatishchev 2025-06-06 15:08:24 -07:00
parent 47c9cff8f5
commit 5ec716919d
Signed by: CaZzzer
SSH Key Fingerprint: SHA256:sqXB3fe0LMpfH+IeM/vlmxKdso52kssrIJBlwKXVe1U
4 changed files with 64 additions and 12 deletions

View File

@ -37,6 +37,19 @@
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
};
mkRouter = hostFile: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
secrix.nixosModules.default
./modules
./modules/router
./hosts/common.nix
hostFile
./users/cazzzer
(hmModule ./home/common.nix)
];
};
in
{
apps.x86_64-linux.secrix = secrix.secrix self;
@ -77,17 +90,9 @@
(hmModule ./home/cazzzer-pc.nix)
];
};
router = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
secrix.nixosModules.default
./modules
./hosts/common.nix
./hosts/router
./users/cazzzer
(hmModule ./home/common.nix)
];
};
router = mkRouter ./hosts/router;
router-1 = mkRouter ./hosts/router-1;
router-2 = mkRouter ./hosts/router-2;
};
# https://github.com/nix-community/nixos-generators?tab=readme-ov-file#using-in-a-flake
packages.x86_64-linux = {

View File

@ -0,0 +1,24 @@
{
imports = [
../hw-vm.nix
];
router = {
enableDesktop = false;
enableDhcpClient = false;
wanMAC = "bc:24:11:af:bd:84";
lanMAC = "bc:24:11:38:b1:91";
wanLL = "fe80::be24:11ff:feaf:bd84";
lanLL = "fe80::be24:11ff:fe38:b191";
defaultToken = 251;
pdFromWan = "fd46:fbbe:ca55:100";
wanAddr4 = "192.168.1.63";
wanGw4 = "192.168.1.254";
};
networking.hostName = "grouty";
# override hw-vm.nix default
networking.useDHCP = false;
}

View File

@ -0,0 +1,24 @@
{
imports = [
../hw-vm.nix
];
router = {
enableDesktop = false;
enableDhcpClient = false;
wanMAC = "bc:24:11:bc:db:c1";
lanMAC = "bc:24:11:19:2a:96";
wanLL = "fe80::be24:11ff:febc:dbc1";
lanLL = "fe80::be24:11ff:fe19:2a96";
defaultToken = 252;
pdFromWan = "fd46:fbbe:ca55:100";
wanAddr4 = "192.168.1.64";
wanGw4 = "192.168.1.254";
};
networking.hostName = "grouta";
# override hw-vm.nix default
networking.useDHCP = false;
}

View File

@ -1,6 +1,5 @@
{
imports = [
../../modules/router
./hardware-configuration.nix
./private.nix
];