From a7087402f00fb543151c34cbf37c138e101a00fa Mon Sep 17 00:00:00 2001 From: clerie Date: Wed, 13 Jul 2022 22:52:50 +0200 Subject: [PATCH] Bootstrap ppp config --- hosts/router/101-net-uplink-a.nix | 26 ++++++++++++++++++++++++++ hosts/router/102-net-uplink-b.nix | 26 ++++++++++++++++++++++++++ hosts/router/configuration.nix | 2 ++ 3 files changed, 54 insertions(+) diff --git a/hosts/router/101-net-uplink-a.nix b/hosts/router/101-net-uplink-a.nix index 506d79c..554258f 100644 --- a/hosts/router/101-net-uplink-a.nix +++ b/hosts/router/101-net-uplink-a.nix @@ -5,4 +5,30 @@ id = 101; interface = "ens18"; }; + + networking.vlans."net-uplink-a.7" = { + id = 7; + interface = "net-uplink-a"; + }; + + services.pppd = { + peers.uplink-a = { + config = '' + plugin rp-pppoe.so net-uplink-a.7 + user "002742928961551138009163#0001@t-online.de" + ifname ppp-uplink-a + persist + maxfail 0 + holdoff 5 + noipdefault + lcp-echo-interval 20 + lcp-echo-failure 3 + mtu 1492 + hide-password + defaultroute + +ipv6 + debug + ''; + }; + }; } diff --git a/hosts/router/102-net-uplink-b.nix b/hosts/router/102-net-uplink-b.nix index be22a3b..edfbd27 100644 --- a/hosts/router/102-net-uplink-b.nix +++ b/hosts/router/102-net-uplink-b.nix @@ -5,4 +5,30 @@ id = 102; interface = "ens18"; }; + + networking.vlans."net-uplink-b.7" = { + id = 7; + interface = "net-uplink-b"; + }; + + services.pppd = { + peers.uplink-b = { + config = '' + plugin rp-pppoe.so net-uplink-b.7 + user "002269158219551138009162#0001@t-online.de" + ifname ppp-uplink-b + persist + maxfail 0 + holdoff 5 + noipdefault + lcp-echo-interval 20 + lcp-echo-failure 3 + mtu 1492 + hide-password + defaultroute + +ipv6 + debug + ''; + }; + }; } diff --git a/hosts/router/configuration.nix b/hosts/router/configuration.nix index 3c2de0e..0b514e4 100644 --- a/hosts/router/configuration.nix +++ b/hosts/router/configuration.nix @@ -75,6 +75,8 @@ clerie.forward-filter.enable = true; + services.pppd.enable = true; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave