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: Raghav Gururajan
Subject: Re: Adding NitoKey Rules to U-Dev Rules
Date: Sat, 06 Jul 2019 17:01:13 -0400

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

Thank you very much for your effort in explaining the following. Much
appreciated ☺

> 
> --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\"")))
> 

Hmm. The other one (below) seems straight forward and simpler. 😉 Thank
s though. :)

> 
> (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"))))))

Thanks a lot again! Would you be able to add this definition
(%nitrokey-udev-rule) into master udev definitions in guix? So that any
user who wants to use these rules now or in future, can just modify
%desktop-services and append %nitrokey-udev-rule, as you suggested
below. ☺

> --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---

Gonna try ☺

> 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.

Ah I see. 😕

Regards,
RG.



reply via email to

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