Wofi-pass's doesn't see pass-otp despite it being installed

I managed to get wofi-pass working for usernames and passwords, and to get pass otp working by adding the following lines to my configuration.nix:

  environment.systemPackages = with pkgs; [
      wofi
      wofi-pass
      (pass.withExtensions (exts: [exts.pass-otp]))
  ]

However when running wofi-pass, and trying to get it to query the otp code, it gives the following error:

Error: otp is not in the password store.

This is the same error it throws when the pass-otp isn’t installed and trying to run pass otp in the terminal.

I’d guess wofi-pass is using a different environment where pass-otp isn’t installed, but my nixos knowledge isn’t good enough to figure out what to do about that.

I am running sway on NixOS 24.05

Usually it’s pretty clear when you look at the souce.

environment.systemPackages = with pkgs; [
  wofi
  (wofi-pass.override { extensions = exts: [exts.pass-otp]; })
  (pass.withExtensions (exts: [exts.pass-otp]))
]

If that weren’t how the package is set up, you could also override the pass passed to the package with .override { pass = pass.withExtensions ... }.

1 Like