Nix cannot create setuid programs, since, in general, non-privileged users could use it to create arbitrary setuid programs. The only way to get setuid program is through NixOS module in configuration.nix
. Instead of writing a module you can instruct users to add the option directly to their configuration.nix` but modules are preferred for convenience.
1 Like