l: add ppp.nix

This commit is contained in:
lassulus 2020-04-22 15:53:22 +02:00
parent 1e91a3c8b2
commit 2cfe78f16c
2 changed files with 33 additions and 0 deletions

View File

@ -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

32
lass/2configs/ppp.nix Normal file
View File

@ -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
];
}