Compare commits
3 Commits
0925b5de04
...
router/mod
| Author | SHA1 | Date | |
|---|---|---|---|
|
17e98fa091
|
|||
|
ff7e27cc62
|
|||
|
3dea018a21
|
38
flake.nix
38
flake.nix
@@ -37,6 +37,19 @@
|
|||||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||||
# arguments to home.nix
|
# 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
|
in
|
||||||
{
|
{
|
||||||
apps.x86_64-linux.secrix = secrix.secrix self;
|
apps.x86_64-linux.secrix = secrix.secrix self;
|
||||||
@@ -77,28 +90,9 @@
|
|||||||
(hmModule ./home/cazzzer-pc.nix)
|
(hmModule ./home/cazzzer-pc.nix)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
router = nixpkgs.lib.nixosSystem {
|
router = mkRouter ./hosts/router;
|
||||||
system = "x86_64-linux";
|
router-1 = mkRouter ./hosts/router-1;
|
||||||
modules = [
|
router-2 = mkRouter ./hosts/router-2;
|
||||||
secrix.nixosModules.default
|
|
||||||
./modules
|
|
||||||
./hosts/common.nix
|
|
||||||
./hosts/router
|
|
||||||
./users/cazzzer
|
|
||||||
(hmModule ./home/common.nix)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
router-1 = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [
|
|
||||||
secrix.nixosModules.default
|
|
||||||
./modules
|
|
||||||
./hosts/common.nix
|
|
||||||
./hosts/router-1
|
|
||||||
./users/cazzzer
|
|
||||||
(hmModule ./home/common.nix)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# https://github.com/nix-community/nixos-generators?tab=readme-ov-file#using-in-a-flake
|
# https://github.com/nix-community/nixos-generators?tab=readme-ov-file#using-in-a-flake
|
||||||
packages.x86_64-linux = {
|
packages.x86_64-linux = {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/router
|
|
||||||
../hw-vm.nix
|
../hw-vm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -18,6 +17,8 @@
|
|||||||
wanGw4 = "192.168.1.254";
|
wanGw4 = "192.168.1.254";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.hostName = "grouty";
|
||||||
|
|
||||||
# override hw-vm.nix default
|
# override hw-vm.nix default
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
}
|
}
|
||||||
|
|||||||
24
hosts/router-2/default.nix
Normal file
24
hosts/router-2/default.nix
Normal 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;
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/router
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./private.nix
|
./private.nix
|
||||||
];
|
];
|
||||||
@@ -14,4 +13,6 @@
|
|||||||
lanLL = "fe80::be24:11ff:fe83:d8de";
|
lanLL = "fe80::be24:11ff:fe83:d8de";
|
||||||
defaultToken = 1;
|
defaultToken = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.hostName = "grouter";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ in
|
|||||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
|
||||||
boot.growPartition = true;
|
boot.growPartition = true;
|
||||||
|
|
||||||
networking.hostName = "grouter";
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
# You can disable this if you're only using the Wayland session.
|
# You can disable this if you're only using the Wayland session.
|
||||||
services.xserver.enable = false;
|
services.xserver.enable = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user