`nixos-option` heisenberg path

Is my username a valid path?

$ nixos-option users.users | fgrep "crinklywrappr ="
  crinklywrappr = {

Seems yes.

But are you sure?

$ nixos-option users.users.crinklywrappr
error: error: At 'crinklywrappr' in path 'users.users.crinklywrappr': error: Option's type.getSubOptions isn't a function
An error occurred while looking for attribute names. Are you sure that 'users.users.crinklywrappr' exists?

Also no.

lol

I ran into this issue while working on a fetch routine for displaying the number of installed packages. I resolved it differently, but for a while this perplexed me. Can someone explain why this happens or if it should happen?

Can’t reproduce here. Will it also fail for other users like sshd? Are you using flakes?

nixos-option was recently rewritten, and I believe this is one of the cases that the new script handles better than the old C++ program. Try it on unstable.

2 Likes

Yeah, that worked great! Thanks! :slight_smile: