summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-04-22 15:53:22 +0200
committerlassulus <lassulus@lassul.us>2020-04-22 15:53:22 +0200
commit2cfe78f16c3b4ecaec672bc3cd2f8edd2f2c5930 (patch)
tree3396db4afe871525110fb3f7720bd6a12949ffa6
parent1e91a3c8b22519e4302fdcd5e28151fbc534a2a9 (diff)
l: add ppp.nix
-rw-r--r--lass/1systems/mors/config.nix1
-rw-r--r--lass/2configs/ppp.nix32
2 files changed, 33 insertions, 0 deletions
diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix
index fe0b6d85b..ff21bf5db 100644
--- a/lass/1systems/mors/config.nix
+++ b/lass/1systems/mors/config.nix
@@ -39,6 +39,7 @@ with import <stockholm/lib>;
<stockholm/lass/2configs/network-manager.nix>
<stockholm/lass/2configs/nfs-dl.nix>
#<stockholm/lass/2configs/hardening.nix>
+ <stockholm/lass/2configs/ppp.nix>
{
krebs.iptables.tables.filter.INPUT.rules = [
#risk of rain
diff --git a/lass/2configs/ppp.nix b/lass/2configs/ppp.nix
new file mode 100644
index 000000000..9cc7568a5
--- /dev/null
+++ b/lass/2configs/ppp.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }: {
+
+ # usage: pppd call default
+
+ environment.etc."ppp/peers/default".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
+ ];
+
+}