I’m trying to use nix flake following this tutorial, but I get an error:
$ nix shell github:edolstra/dwarffs --command dwarffs --version
warning: ignoring the user-specified setting 'experimental-features', because it is a restricted setting and you are not a trusted user
However, if you look at the documentation of nix, it’s written:
Adding a user to trusted-users is essentially equivalent to giving that user root access to the system.
But I don’t really want to give root access to my user (not great from a security point of view), but I still want to use nix flake… Do I have any solution?
For non-nixOS installation you need at least one trusted user as well.
If you did a single-user installation, the user that installed usually is the only trusted user and the only allowed user. Not sure if it would work to add more users there.
In a multi-user installation the default is root as trusted, everyone else as allowed, IIRC.
I have no clue how to properly configure nix in a single user installation, though back when I used Arch Linux + nix, I was able to edit /etc/nix/nix.conf directly.