I currently have a NixOS config using flakes and sops-nix, meaning it’s really simple to store my hashed password as a secret with the following.
users.users.<name>.hashedPasswordFile = config.sops.secrets.hashedPassword.path;
I would like to have users.users.<name>.description to be managed in a similar way using my full name as I don’t have it on my public GitHub and would rather not have it uploaded in an unencrypted form. Once I build my OS I don’t really mind if it would end up in the public nix store or anything.
I was expecting to see some option like users.users.<name>.descriptionFile but there doesn’t seem to be one. As I understand it, using something like builtins.readFile for users.users.<name>.description to read from some file would fail to evaluate by default in a flake because it’s an impure operation. What would be the best course of action here? Is adding something like users.users.<name>.descriptionFile to the spec the correct way forward here or is there a better alternative to achieve this?