summaryrefslogtreecommitdiffstats
path: root/lass/2configs/ppp/x220-modem.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-01-27 22:57:15 +0100
committermakefu <github@syntax-fehler.de>2021-01-27 22:57:15 +0100
commit144edeee1030d647bcc64083efc5834d1628341d (patch)
tree92f32df8dbc09b1bc36061267967b605628409b7 /lass/2configs/ppp/x220-modem.nix
parent9c6c20f69e7b76e4231ffeae715d2ee5d453bb4d (diff)
parenta2ca5f2e214be259fdb0f9ea92b79d74e6216a51 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/ppp/x220-modem.nix')
-rw-r--r--lass/2configs/ppp/x220-modem.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/lass/2configs/ppp/x220-modem.nix b/lass/2configs/ppp/x220-modem.nix
new file mode 100644
index 000000000..d6facb724
--- /dev/null
+++ b/lass/2configs/ppp/x220-modem.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }: {
+
+ # usage: pppd call x220
+
+ environment.etc."ppp/peers/x220".text = ''
+ /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
+ ];
+
+}