use ppp module in pppoe test

This commit is contained in:
Daniel Barlow 2023-07-14 22:23:11 +01:00
parent df6cfe1cd5
commit 5fee3e54d2

View file

@ -1,27 +1,19 @@
{ config, pkgs, lib, ... } : { config, pkgs, lib, ... } :
let let
inherit (pkgs.liminix.networking) interface address pppoe route dnsmasq; inherit (pkgs.liminix.networking) interface address route dnsmasq;
inherit (pkgs.liminix.services) oneshot longrun bundle target output; inherit (pkgs.liminix.services) oneshot longrun bundle target output;
in rec { in rec {
services.lan4 = services.lan4 =
let iface = interface { type = "hardware"; device = "eth1";}; let iface = interface { type = "hardware"; device = "eth1";};
in address iface { family = "inet4"; address ="192.168.19.1"; prefixLength = 24;}; in address iface { family = "inet4"; address ="192.168.19.1"; prefixLength = 24;};
kernel.config = { imports = [
"PPP" = "y"; ../../modules/ppp
"PPPOE" = "y"; ];
"PPPOL2TP" = "y";
"L2TP" = "y";
"PPP_ASYNC" = "y";
"PPP_BSDCOMP" = "y";
"PPP_DEFLATE" = "y";
"PPP_MPPE" = "y";
"PPP_SYNC_TTY" = "y";
};
services.pppoe = services.pppoe =
let iface = interface { type = "hardware"; device = "eth0"; }; config.system.service.pppoe {
in pppoe iface { interface = interface { type = "hardware"; device = "eth0"; };
ppp-options = [ ppp-options = [
"debug" "+ipv6" "noauth" "debug" "+ipv6" "noauth"
"name" "db123@a.1" "name" "db123@a.1"
@ -30,7 +22,7 @@ in rec {
}; };
services.defaultroute4 = route { services.defaultroute4 = route {
name = "defautlrote"; name = "defaultroute";
via = "$(output ${services.pppoe} address)"; via = "$(output ${services.pppoe} address)";
target = "default"; target = "default";
dependencies = [ services.pppoe ]; dependencies = [ services.pppoe ];