summaryrefslogtreecommitdiffstats
path: root/lass/2configs/ppp/x220-modem.nix
blob: d6facb724260efea9d38b8d908826267ec0258af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
  ];

}