+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------

Granting access to users
===============================
The user running nitrocli needs the necessary privileges to access
the device. You may need to change the permissions of the corresponding
usb(4) , uhid(4) and ugen(4) controllers as a result.

You may identify the usb(4) device the NitroKey is attached to with
usbdevs(8). The corresponding uhid(4) and ugen(4) devices can be
obtained from the output of dmesg(8). You may then use chgrp(1) and
chmod(8) to grant access to the NitroKey. For example, in order to allow
users from the wheel group to use the NitroKey you would issue commands
such as:

chgrp wheel /dev/usb1 /dev/ugen0.* /dev/uhid0
chmod 660 /dev/usb1 /dev/ugen0.* /dev/uhid0

Beware this may allow the user unintended access to other hardware
associated to the same usb(4) controller, so do this with extreme
caution.

Interaction with gpg-agent
===============================
A working gpg-agent is required for a number of operations. You may
need to add the following line to your $HOME/.profile in order to
ensure the agent is invoked properly:

export GPG_TTY=$(tty)

There is a known bug in libnitrokey that may cause the NitroKey to hang
if a smartcard operation is performed and a libnitrokey operation is
attempted immediately afterwards. The implication is that if you use a
NitroKey for decrypting or signing via gpg, you will need to restart the
gpg-agent with:

gpgconf --kill gpg-agent

Shell Autocompletion
===============================
Upstream nitrocli ships with an utility for generating autocompletion
configurations for many popular shells. You may invoke
nitrocli-shell-complete and use its output to configure your shell if
you want autocompletion.
