What is the simplest way to check if one has single or multi-user Nix installed?

What I settled on was to test if /nix/store is owned by root with the sticky bit. There’s a long explanatory comment in this code

Also to note, checking for the nixbld group won’t work if a multi-user install was replaced with a single-user install without fully cleaning it up first. This is true of testing pretty much anything outside of /nix/store.

6 Likes