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/ssh"
|
||||||
"${inputs.liminix}/modules/bridge"
|
"${inputs.liminix}/modules/bridge"
|
||||||
"${inputs.liminix}/modules/health-check"
|
"${inputs.liminix}/modules/health-check"
|
||||||
"${modulesPath}/profiles/gateway.nix"
|
"${modulesPath}/profiles/wap.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
hostname = "whitehouse-2";
|
hostname = "whitehouse-2";
|
||||||
boot = {
|
boot = {
|
||||||
tftp = {
|
tftp = {
|
||||||
freeSpaceBytes = 3 * 1024 * 1024;
|
freeSpaceBytes = 3 * 1024 * 1024;
|
||||||
serverip = "${secrets.lan.prefix}.148";
|
serverip = "${secrets.lan.prefix}.149";
|
||||||
ipaddr = "${secrets.lan.prefix}.251";
|
ipaddr = "${secrets.lan.prefix}.252";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,50 +60,14 @@ in
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
profile.gateway = {
|
profiles.wap = {
|
||||||
lan = {
|
interfaces = with config.hardware.networkInterfaces; [
|
||||||
interfaces = with config.hardware.networkInterfaces; [
|
lan
|
||||||
wlan
|
wlan
|
||||||
wlan5
|
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
dhcp6.enable = true;
|
|
||||||
};
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
rules = secrets.firewallRules;
|
|
||||||
};
|
|
||||||
wireless.networks = {
|
wireless.networks = {
|
||||||
|
|
||||||
"${secrets.ssid}" = {
|
"${secrets.ssid}" = {
|
||||||
interface = config.hardware.networkInterfaces.wlan;
|
interface = config.hardware.networkInterfaces.wlan;
|
||||||
hw_mode = "g";
|
hw_mode = "g";
|
||||||
@@ -124,6 +88,7 @@ in
|
|||||||
// wirelessConfig;
|
// wirelessConfig;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultProfile.packages = with pkgs; [
|
defaultProfile.packages = with pkgs; [
|
||||||
busybox
|
busybox
|
||||||
iw
|
iw
|
||||||
|
|||||||
Reference in New Issue
Block a user