diff --git a/examples/l2tp.nix b/examples/l2tp.nix index e07fc46..169e62f 100644 --- a/examples/l2tp.nix +++ b/examples/l2tp.nix @@ -36,18 +36,22 @@ in rec { username = "user"; password = "one2one"; authType = "chap"; + }; + + services.dhcpc = svc.network.dhcp.client.build { + interface = config.services.wwan; dependencies = [ config.services.hostname ]; }; services.sshd = svc.ssh.build { }; services.resolvconf = oneshot rec { - dependencies = [ services.wwan ]; + dependencies = [ services.dhcpc ]; name = "resolvconf"; up = '' . ${serviceFns} ( in_outputs ${name} - for i in $(output ${services.wwan} dns); do + for i in $(output ${services.dhcpc} dns); do echo "nameserver $i" > resolv.conf done ) diff --git a/modules/cdc-ncm/wwan.nix b/modules/cdc-ncm/wwan.nix index b65d460..adf4f4a 100644 --- a/modules/cdc-ncm/wwan.nix +++ b/modules/cdc-ncm/wwan.nix @@ -53,7 +53,6 @@ let }; symlink = "/dev/modem"; }); - # XXX need an ip-up script here to collect the IP address up = '' ls -l /dev/modem test -L /dev/modem || exit 1