diff --git a/layers/nfc.nix b/layers/nfc.nix new file mode 100644 index 0000000000000000000000000000000000000000..207c9afdb787b77f86609896fa63e069a185c7c9 --- /dev/null +++ b/layers/nfc.nix @@ -0,0 +1,17 @@ +{ config, pkgs, lib, ... }: +with lib; + +{ + services.udev.packages = singleton (pkgs.writeTextFile { + name = "nfc-uart-udev-rules"; + destination = "/etc/udev/rules.d/90-nfc-uart.rules"; + text = '' + SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", GROUP="dialout", SYMLINK+="nfc-uart" + ''; + }); + + environment.etc."nfc/libnfc.conf".text = '' + device.name = "PN532 board via UART" + device.connstring = pn532_uart:/dev/nfc-uart + ''; +} diff --git a/layers/tv.nix b/layers/tv.nix new file mode 100644 index 0000000000000000000000000000000000000000..0fd2aecebbcad5842e7356645463b413b6389a8e --- /dev/null +++ b/layers/tv.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: +with lib; + +{ + services.udev.packages = singleton (pkgs.writeTextFile { + name = "tv-serial-udev-rules"; + destination = "/etc/udev/rules.d/90-tv-serial.rules"; + text = '' + SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="tv-serial" + ''; + }); +}