summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-12-25 01:08:39 +0100
committerlassulus <lassulus@lassul.us>2022-12-25 01:08:39 +0100
commitc337e2593b9b28c4248cffc07edf530351df491f (patch)
tree029ada63863b2fc8e818772676a50eb502d7ca18 /lass/2configs
parent37e2e08a0ad47985de277a01d392a11fbe2242f0 (diff)
l mors.r: add autotether
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/autotether.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/lass/2configs/autotether.nix b/lass/2configs/autotether.nix
new file mode 100644
index 000000000..98712303e
--- /dev/null
+++ b/lass/2configs/autotether.nix
@@ -0,0 +1,16 @@
+{ config, lib, pkgs, ... }:
+{
+ systemd.services.usb_tether = {
+ script = ''
+ ${pkgs.android-tools}/bin/adb -s QV770FAMEK wait-for-device
+ ${pkgs.android-tools}/bin/adb -s QV770FAMEK shell svc usb setFunctions rndis
+ '';
+ };
+ services.udev.extraRules = ''
+ ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="fce/320d/510", TAG+="systemd", ENV{SYSTEMD_WANTS}="usb_tether.service"
+ '';
+ systemd.network.networks.android = {
+ matchConfig.Name = "enp0s20u1";
+ DHCP = "yes";
+ };
+}