stockholm/lass/2configs/ppp/x220-modem.nix

33 lines
505 B
Nix
Raw Normal View History

2020-04-22 13:53:22 +00:00
{ pkgs, ... }: {
2021-01-23 19:42:51 +00:00
# usage: pppd call x220
2020-04-22 13:53:22 +00:00
2021-01-23 19:42:51 +00:00
environment.etc."ppp/peers/x220".text = ''
2020-04-22 13:53:22 +00:00
/dev/ttyACM2
921600
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
];
}