at 24.11-pre 647 B view raw
1{ config, lib, ... }: 2 3with lib; 4 5{ 6 7 ####### interface 8 9 options = { 10 11 hardware.onlykey = { 12 enable = mkOption { 13 type = types.bool; 14 default = false; 15 description = '' 16 Enable OnlyKey device (https://crp.to/p/) support. 17 ''; 18 }; 19 }; 20 21 }; 22 23 ## As per OnlyKey's documentation piece (hhttps://docs.google.com/document/d/1Go_Rs218fKUx-j_JKhddbSVTqY6P0vQO831t2MKCJC8), 24 ## it is important to add udev rule for OnlyKey for it to work on Linux 25 26 ####### implementation 27 28 config = mkIf config.hardware.onlykey.enable { 29 services.udev.extraRules = builtins.readFile ./onlykey.udev; 30 }; 31 32 33}