From af1ba97298eca3684b66701d5a7fcb4e6b3e1873 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 31 May 2022 11:37:51 +0200 Subject: [PATCH] Add blink1 udev rules --- modules/base/blink1-udev/default.nix | 33 ++++++++++++++++++++++++++++ modules/base/default.nix | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 modules/base/blink1-udev/default.nix diff --git a/modules/base/blink1-udev/default.nix b/modules/base/blink1-udev/default.nix new file mode 100644 index 0000000..da40991 --- /dev/null +++ b/modules/base/blink1-udev/default.nix @@ -0,0 +1,33 @@ +{ mkDerivation, lib }: +let + udevRules = '' +''; +in +mkDerivation +{ + pname = "blink1-udev-rules"; + version = "20220531093409"; + + src = ./.; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/lib/udev/rules.d + echo 'ATTRS{idVendor}=="27b8", ATTRS{idProduct}=="01ed", TAG+="uaccess"' > $out/lib/udev/rules.d/51-blink1.rules + ''; + + meta = with lib; { + description = "udev rules for blink1"; + license = licenses.mit; + maintainers = [ + { + email = "erwin@datarift.nl"; + github = "eboskma"; + name = "Erwin Boskma"; + } + ]; + platforms = platforms.linux; + homepage = "https://blink1.thingm.com"; + }; +} diff --git a/modules/base/default.nix b/modules/base/default.nix index fc4209f..48f9586 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -10,6 +10,10 @@ with lib; let inherit (pkgs.stdenv) mkDerivation; inherit lib; }; + blink1Rules = pkgs.callPackage ./blink1-udev { + inherit (pkgs.stdenv) mkDerivation; + inherit lib; + }; in { options.eboskma.base = { @@ -67,6 +71,7 @@ in extraRules = qmkUdevRules; packages = [ probersRules + blink1Rules ]; }; };