mob next [ci-skip] [ci skip] [skip ci]

lastFile:modules/clan/gw-router/default.nix
This commit is contained in:
2026-08-06 14:01:25 +07:00
parent a97f3f82e5
commit 17f3860f9b
3 changed files with 4 additions and 10 deletions
-8
View File
@@ -112,14 +112,6 @@
pinned (cloned from the old router). null keeps the hardware MAC.
'';
};
pppInterface = lib.mkOption {
type = lib.types.str;
internal = true;
readOnly = true;
default = if config.wan.vlanId == null then config.wan.interface else "wan-vlan";
description = "Interface pppd dials on (the WAN port or its ISP VLAN).";
};
};
vlans = lib.mkOption {
+1 -1
View File
@@ -3,7 +3,7 @@ let
module = ./default.nix;
in
{
flake.clan.modules = {
clan.modules = {
gw-router = module;
};
# perSystem =
+3 -1
View File
@@ -4,6 +4,8 @@
{ config, ... }:
let
creds = config.clan.core.vars.generators.gw-router;
pppInterface = if settings.wan.vlanId == null then settings.wan.interface else "wan-vlan";
in
{
clan.core.vars.generators.gw-router = {
@@ -30,7 +32,7 @@
peers.wan = {
autostart = true;
config = ''
plugin pppoe.so ${settings.wan.pppInterface}
plugin pppoe.so ${pppInterface}
ifname ppp0
file ${creds.files."pppoe-username".path}
noipdefault