mob next [ci-skip] [ci skip] [skip ci]
lastFile:routers/white-house-2/configuration.nix
This commit is contained in:
@@ -26,15 +26,15 @@ in
|
||||
"${inputs.liminix}/modules/ssh"
|
||||
"${inputs.liminix}/modules/bridge"
|
||||
"${inputs.liminix}/modules/health-check"
|
||||
"${modulesPath}/profiles/gateway.nix"
|
||||
"${modulesPath}/profiles/wap.nix"
|
||||
];
|
||||
|
||||
hostname = "whitehouse-2";
|
||||
boot = {
|
||||
tftp = {
|
||||
freeSpaceBytes = 3 * 1024 * 1024;
|
||||
serverip = "${secrets.lan.prefix}.148";
|
||||
ipaddr = "${secrets.lan.prefix}.251";
|
||||
serverip = "${secrets.lan.prefix}.149";
|
||||
ipaddr = "${secrets.lan.prefix}.252";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -60,50 +60,14 @@ in
|
||||
}
|
||||
);
|
||||
|
||||
profile.gateway = {
|
||||
lan = {
|
||||
interfaces = with config.hardware.networkInterfaces; [
|
||||
wlan
|
||||
wlan5
|
||||
lan
|
||||
];
|
||||
inherit (secrets.lan) prefix;
|
||||
address = {
|
||||
family = "inet";
|
||||
address = "${secrets.lan.prefix}.1";
|
||||
prefixLength = 24;
|
||||
};
|
||||
dhcp = {
|
||||
start = 10;
|
||||
end = 240;
|
||||
hosts = { };
|
||||
localDomain = "lan";
|
||||
};
|
||||
};
|
||||
wan =
|
||||
let
|
||||
inherit (config.system.service) vlan;
|
||||
wan-vlan = vlan.build {
|
||||
ifname = "wan-vlan";
|
||||
primary = config.hardware.networkInterfaces.wan;
|
||||
vid = "10";
|
||||
};
|
||||
in
|
||||
{
|
||||
interface = svc.pppoe.build {
|
||||
interface = wan-vlan;
|
||||
username = secrets.l2tp.name;
|
||||
password = secrets.l2tp.password;
|
||||
};
|
||||
profiles.wap = {
|
||||
interfaces = with config.hardware.networkInterfaces; [
|
||||
lan
|
||||
wlan
|
||||
wlan5
|
||||
];
|
||||
|
||||
dhcp6.enable = true;
|
||||
};
|
||||
firewall = {
|
||||
enable = true;
|
||||
rules = secrets.firewallRules;
|
||||
};
|
||||
wireless.networks = {
|
||||
|
||||
"${secrets.ssid}" = {
|
||||
interface = config.hardware.networkInterfaces.wlan;
|
||||
hw_mode = "g";
|
||||
@@ -124,6 +88,7 @@ in
|
||||
// wirelessConfig;
|
||||
};
|
||||
};
|
||||
|
||||
defaultProfile.packages = with pkgs; [
|
||||
busybox
|
||||
iw
|
||||
|
||||
Reference in New Issue
Block a user