summaryrefslogtreecommitdiffstats
path: root/lass/2configs/ppp/umts-stick.nix
blob: 64551a2b3ea734a9070c0e02eefbd2c152316049 (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
33
{ pkgs, ... }: {

  # usage: pppd call stick

  environment.etc."ppp/peers/stick".text = ''
    /dev/ttyUSB0
    460800
    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
  ];

}