ZFS Failed to open key material file

It seems to be the case:

Jul 17 02:22:59 iso systemd[1]: Started decrypt-iso-password.service.
Jul 17 02:22:59 iso decrypt-iso-password-start[348]: loading "/nix/store/qpmypc2hndyyxk30zv0xi0qcfx739f5l-pcsclite-2.4.1-lib/lib/libpcsclite_real.so.1" failed: /nix/store/qpmypc2hndyyxk30zv0xi0qcfx739f5l-pcsclite-2.4.1-lib/lib/libpcsclite_real.so.1: cannot open shared object file: No such file or directory
Jul 17 02:22:59 iso decrypt-iso-password-start[348]: Error: Error while communicating with YubiKey: PC/SC error: An internal consistency check failed
Jul 17 02:22:59 iso decrypt-iso-password-start[348]: Cause: An internal consistency check failed
Jul 17 02:22:59 iso decrypt-iso-password-start[348]: [ Did this not do what you expected? Could an error be more useful? ]
Jul 17 02:22:59 iso decrypt-iso-password-start[348]: [ Tell us: https://str4d.xyz/age-plugin-yubikey/report              ]
Jul 17 02:22:59 iso systemd[1]: decrypt-iso-password.service: Main process exited, code=exited, status=1/FAILURE
Jul 17 02:22:59 iso systemd[1]: decrypt-iso-password.service: Failed with result 'exit-code'.

Which means it cannot access the pcscd daemon. Is there any way to implement the following fix in stage 1, adapted from here?

echo "[setupYubikeys] Adding age plugins to path..."
PATH=$PATH:${lib.makeBinPath config.age.plugins.packages}

echo "[setupYubikeys] Making pcsc directory and linking drivers..."
${pkgs.runtimeShell} -c "mkdir -p /var/lib/pcsc && ln -sfn ${pkgs.ccid}/pcsc/drivers /var/lib/pcsc/drivers"

# TODO: https://github.com/Mic92/sops-nix/issues/377#issuecomment-3263198635
echo "[setupYubikeys] Killing pcscd..."
pgrep pcscd > /dev/null && pkill pcscd

echo "[setupYubikeys] Running pcscd..."
pcscd

echo "[setupYubikeys] Pcscd running."

For example, /var/lib would not be accessible, correct? Could I create a mount for it in ram instead?

1 Like