From 3ed2d7d3701234325fef6b659feaa83ec2723b93 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 24 Nov 2020 22:13:32 +0100 Subject: getty-for-esp: init this module provides a serial port which is exposed via an esp8266 to the network via wifi. it essentially creates a backdoor to the serial console when the network config is b0rked again --- krebs/2configs/hw/getty-for-esp.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 krebs/2configs/hw/getty-for-esp.nix (limited to 'krebs/2configs/hw') diff --git a/krebs/2configs/hw/getty-for-esp.nix b/krebs/2configs/hw/getty-for-esp.nix new file mode 100644 index 00000000..18c91235 --- /dev/null +++ b/krebs/2configs/hw/getty-for-esp.nix @@ -0,0 +1,17 @@ +{ + # 1. Program an esp8266 devboard (esp8266+usb-ttl) with # https://github.com/jeelabs/esp-link + # tested vesion: esp-link v3.2.47-g9c6530d + # Pin Preset: esp-bridge + # tx-enable: false + # uart-pins: normal + # 2. connect directly with usb-cable to device, check that vendorID and ProductID match + # 3. nc 23 + # Info: for puyak the root pw is `brain hosts/puyak/root` + services.udev.extraRules = '' + SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ilo", MODE="0660" + ''; + systemd.services."serial-getty@ilo".enable = true; + systemd.services."serial-getty@ilo".wantedBy = [ "multi-user.target" ]; + systemd.services."serial-getty@ilo".serviceConfig.Restart = "always"; +} + -- cgit v1.2.3