nitrokey: Force learn keys from card on plug
This allows the signing key to be shared among multiple nitrokeys.
This commit is contained in:
parent
04a0a6e5ff
commit
04c7bc089f
|
@ -15,5 +15,15 @@ lib.mkMerge [
|
|||
#nitrokey-app2
|
||||
#pynitrokey
|
||||
];
|
||||
|
||||
systemd.user.services.gpg-force-learn-cards = {
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.gnupg}/bin/gpg-connect-agent 'learn --force' '/bye'";
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="42b2", ENV{SYSTEMD_USER_WANTS}="gpg-force-learn-cards.service"
|
||||
'';
|
||||
})
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue