Why is sops-nix not finding my keyfile?

I’ve specifed the keyfile as

  sops.age.keyFile = "/home/b0ef/.config/sops/age/keys.txt";

, but I get this:

/nix/store/di3d14qihvc71hvmikj35ym8cfix717w-sops-install-secrets-0.0.1/bin/sops-install-secrets: can not read keyfile '/home/b0ef/.config/sops/age/keys.txt': open /home/b0ef/.config/sops/age/keys.txt: no such file or directory
$ file /home/b0ef/.config/sops/age/keys.txt
/home/b0ef/.config/sops/age/keys.txt: ASCII text

I’m a bit confused, cause I had this working with home-manager module.

I can probably post all the code, but it might just be something small I missed?:wink:

Is this happening at boot or during a switch? I’d suspect your home directory of not having been mounted early enough, since it’s not immediately needed for boot.

This is during

nixos-rebuild switch --flake .#pi --target-host root@ --option eval-cache false --impure

Not sure what you mean with mounted early enough, cause it’s all on the same drive as root.

This is a also a remote nixos-rebuild, if that makes a difference.

Silly question, but did you actually copy that file to the raspberry pi?

Ok, wow, that was not silly, cause I did not do that;) I’m the silly willy.

Good Saturday to you…:wink: