Declaratively (or otherwise) add trusted users in 21.11?

In 22.11 you can do this in configuration.nix (ref

nix.settings.trusted-users = [ "username" ];

but that option is not in 21.11. How can I accomplish the same goal while stuck on 21.11? (See this other thread for why I’m stuck on 21.11.)

A couple of related questions:

  1. Can I find but for a previous version of NixOS? Now that link shows documentation for 22.11.
  2. seems to only be available for 22.11 and unstable. Is there any way to use that for previous versions?

You should able to use:

nix.trustedUsers = [ "root" "@wheel" ];

I do not know how to find the previous manual on the internet but nixos’ documentation option can allow you to install a man page and an html copy of the documentation


You might need to just use nix.extraOptions.