l: split ppp.nix by modem

This commit is contained in:
lassulus 2021-01-23 20:42:51 +01:00
parent 34470a6e92
commit 1562ee7ca9
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,33 @@
{ pkgs, ... }: {
# usage: pppd call stick
environment.etc."ppp/peers/stick".text = ''
/dev/ttyUSB0
460800
crtscts
defaultroute
holdoff 10
lock
maxfail 0
noauth
nodetach
noipdefault
passive
persist
usepeerdns
connect "${pkgs.ppp}/bin/chat -f ${pkgs.writeText "default.chat" ''
ABORT "BUSY"
ABORT "NO CARRIER"
REPORT CONNECT
"" "ATDT*99#"
CONNECT
''}"
'';
environment.systemPackages = [
pkgs.ppp
];
}

View File

@ -1,8 +1,8 @@
{ pkgs, ... }: { { pkgs, ... }: {
# usage: pppd call default # usage: pppd call x220
environment.etc."ppp/peers/default".text = '' environment.etc."ppp/peers/x220".text = ''
/dev/ttyACM2 /dev/ttyACM2
921600 921600
crtscts crtscts