mob next [ci-skip] [ci skip] [skip ci]
lastFile:modules/clan/gw-router/default.nix
This commit is contained in:
@@ -112,14 +112,6 @@
|
|||||||
pinned (cloned from the old router). null keeps the hardware MAC.
|
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 {
|
vlans = lib.mkOption {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ let
|
|||||||
module = ./default.nix;
|
module = ./default.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.clan.modules = {
|
clan.modules = {
|
||||||
gw-router = module;
|
gw-router = module;
|
||||||
};
|
};
|
||||||
# perSystem =
|
# perSystem =
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
let
|
let
|
||||||
creds = config.clan.core.vars.generators.gw-router;
|
creds = config.clan.core.vars.generators.gw-router;
|
||||||
|
|
||||||
|
pppInterface = if settings.wan.vlanId == null then settings.wan.interface else "wan-vlan";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
clan.core.vars.generators.gw-router = {
|
clan.core.vars.generators.gw-router = {
|
||||||
@@ -30,7 +32,7 @@
|
|||||||
peers.wan = {
|
peers.wan = {
|
||||||
autostart = true;
|
autostart = true;
|
||||||
config = ''
|
config = ''
|
||||||
plugin pppoe.so ${settings.wan.pppInterface}
|
plugin pppoe.so ${pppInterface}
|
||||||
ifname ppp0
|
ifname ppp0
|
||||||
file ${creds.files."pppoe-username".path}
|
file ${creds.files."pppoe-username".path}
|
||||||
noipdefault
|
noipdefault
|
||||||
|
|||||||
Reference in New Issue
Block a user