ctucx.git: nixfiles

ctucx' nixfiles

commit f865e70acedca714acd3ebd324278ad5890fd540
parent b83d844426aabe189b94ef772cb2810b91d57c08
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 9 Dec 2022 22:20:42 +0100

machines/lollo/smarthome: remove serial2tcp
2 files changed, 0 insertions(+), 41 deletions(-)
diff --git a/machines/lollo/smarthome/default.nix b/machines/lollo/smarthome/default.nix
@@ -5,7 +5,6 @@
   imports = [
     ./zigbee2mqtt.nix
     ./mbusd.nix
-    ./serial2tcp.nix
 
     ./influxdb2.nix
   ];
diff --git a/machines/lollo/smarthome/serial2tcp.nix b/machines/lollo/smarthome/serial2tcp.nix
@@ -1,40 +0,0 @@
-{ pkgs, ... }:
-
-let
-  serial2tcp = pkgs.nimPackages.buildNimPackage {
-    pname       = "serial2tcp";
-    version     = "0.1.0";
-    nimBinOnly  = true;
-
-    src = pkgs.fetchgit {
-      url    = "https://cgit.ctu.cx/serial2tcp";
-      rev    = "6a81ddbc0e68cbb4e020a3ddc81cd93947a8da5f";
-      sha256 = "1b8iigq3r21sg02wqsxs26y74m44q92phn18510y3nxm617s5k5w";
-    };
-  };
-
-in {
-
-  services.udev.extraRules = ''SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{serial}=="AL006SR4", SYMLINK+="jeelink0"'';
-
-  systemd.services.serial2tcp = {
-    wantedBy  = [ "multi-user.target" ];
-    requires  = [ "network-online.target" "dev-jeelink0.device" ];
-    wants     = [ "network-online.target" "dev-jeelink0.device" ];
-    after     = [ "network-online.target" "dev-jeelink0.device" ];
-    onFailure = [ "email-notify@%i.service" ];
-
-    serviceConfig = {
-      ExecStartPre = "${pkgs.coreutils}/bin/stty -F /dev/jeelink0 raw -echo -echoe -echok speed 9600";
-      ExecStart    = "${serial2tcp}/bin/serial2tcp";
-      Restart      = "on-failure";
-      RestartSec   = "5";
-    };
-
-    environment = {
-      PORT          = "2342";
-      SERIAL_DEVICE = "/dev/jeelink0";
-    };
-  };
-
-}