help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding NitoKey Rules to U-Dev Rules


From: Pierre Neidhardt
Subject: Re: Adding NitoKey Rules to U-Dev Rules
Date: Sat, 06 Jul 2019 10:42:12 +0200

I bought 1 year ago and did not succeed in getting it to work on Guix.
Haven't tried in a while though.

Regarding the Udev rule: in your operating system declaration, you can
try one of those 2 rules:


--8<---------------cut here---------------start------------->8---
(define %nitrokey-udev-rule
  (udev-rule
   "41-nitrokey.rules"
   (string-append "ACTION==\"add\", SUBSYSTEM==\"usb\", "
                  "ATTR{idVendor}==\"20a0\", ATTR{idProduct}==\"4211\", "
                  "ENV{ID_SMARTCARD_READER}=\"1\", 
ENV{ID_SMARTCARD_READER_DRIVER}=\"gnupg\", GROUP+=\"users\", MODE=\"0666\"")))

; or

(define %nitrokey-udev-rule
  (file->udev-rule
   "41-nitrokey.rules"
   (let ((version "20170910"))
     (origin
       (method url-fetch)
       (uri "https://www.nitrokey.com/sites/default/files/41-nitrokey.rules";)
       (sha256
        (base32 "127nghkfd4dl5mkf5xl1mij2ylxhkgg08nlh912xwrrjyjv4y9sa"))))))
--8<---------------cut here---------------end--------------->8---

Then modify the udev-service-type:

--8<---------------cut here---------------start------------->8---
(modify-services
      %desktop-services
    (udev-service-type config =>
                       (udev-configuration
                        (inherit config)
                        (rules (append (udev-configuration-rules config)
                                       (list %nitrokey-udev-rule))))))
--8<---------------cut here---------------end--------------->8---

For me, it seemed that the Udev rules worked, but after that any attempt
to use the key with GPG would segfault `gpg`! :(

Hopefully this has been fixed upstream.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]