nixos-module/container/upstream/pppoe: fix user option
This commit is contained in:
parent
e2580e78fd
commit
624f2e38f6
|
@ -16,13 +16,13 @@ in lib.mkIf (pppoeInterfaces != {}) {
|
||||||
|
|
||||||
environment.etc."ppp/pap-secrets".text = lib.concatMapStrings (ifName:
|
environment.etc."ppp/pap-secrets".text = lib.concatMapStrings (ifName:
|
||||||
let
|
let
|
||||||
inherit (pppoeInterfaces.${ifName}) user password;
|
inherit (pppoeInterfaces.${ifName}.upstream) user password;
|
||||||
in ''
|
in ''
|
||||||
"${user}" * "${password}"
|
"${user}" * "${password}"
|
||||||
'') (builtins.attrNames pppoeInterfaces);
|
'') (builtins.attrNames pppoeInterfaces);
|
||||||
services.pppd = {
|
services.pppd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
peers = builtins.mapAttrs (ifName: { upstream, user, ... }: {
|
peers = builtins.mapAttrs (ifName: { upstream, ... }: {
|
||||||
enable = true;
|
enable = true;
|
||||||
autostart = true;
|
autostart = true;
|
||||||
config = ''
|
config = ''
|
||||||
|
@ -30,7 +30,7 @@ in lib.mkIf (pppoeInterfaces != {}) {
|
||||||
nic-${upstream.link}
|
nic-${upstream.link}
|
||||||
ifname ${ifName}
|
ifname ${ifName}
|
||||||
# Login settings. (PAP)
|
# Login settings. (PAP)
|
||||||
name "${user}"
|
name "${upstream.user}"
|
||||||
noauth
|
noauth
|
||||||
hide-password
|
hide-password
|
||||||
# Connection settings.
|
# Connection settings.
|
||||||
|
|
Loading…
Reference in New Issue