From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghav Gururajan Subject: Re: Adding NitoKey Rules to U-Dev Rules Date: Sat, 06 Jul 2019 17:01:13 -0400 Message-ID: <0153daef12942ca6f0189bc04bb746ebeb6b065d.camel@disroot.org> References: <87d0iovu77.fsf@gnu.org> <87lfxbd063.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38160) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjroU-0005wt-Py for help-guix@gnu.org; Sat, 06 Jul 2019 17:01:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjroT-0007si-DF for help-guix@gnu.org; Sat, 06 Jul 2019 17:01:42 -0400 In-Reply-To: <87lfxbd063.fsf@ambrevar.xyz> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt , Mike Gerwitz Cc: help-guix@gnu.org > 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 =E2=98=BA >=20 > --8<---------------cut here---------------start------------->8--- > (define %nitrokey-udev-rule > (udev-rule > "41-nitrokey.rules" > (string-append "ACTION=3D=3D\"add\", SUBSYSTEM=3D=3D\"usb\", " > "ATTR{idVendor}=3D=3D\"20a0\", > ATTR{idProduct}=3D=3D\"4211\", " > "ENV{ID_SMARTCARD_READER}=3D\"1\", > ENV{ID_SMARTCARD_READER_DRIVER}=3D\"gnupg\", GROUP+=3D\"users\", > MODE=3D\"0666\""))) >=20 Hmm. The other one (below) seems straight forward and simpler. =F0=9F=98=89= Thank s though. :) >=20 > (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. =E2=98=BA > --8<---------------cut here---------------end--------------->8--- >=20 > Then modify the udev-service-type: >=20 > --8<---------------cut here---------------start------------->8--- > (modify-services > %desktop-services > (udev-service-type config =3D> > (udev-configuration > (inherit config) > (rules (append (udev-configuration-rules > config) > (list %nitrokey-udev- > rule)))))) > --8<---------------cut here---------------end--------------->8--- Gonna try =E2=98=BA > For me, it seemed that the Udev rules worked, but after that any > attempt > to use the key with GPG would segfault `gpg`! :( >=20 > Hopefully this has been fixed upstream. Ah I see. =F0=9F=98=95 Regards, RG.