I installed Nix 2.7.0 multi-user on Ubuntu, but I can’t figure out how to let users update their channels:
- the default installation gives users no channels of their own, but their
nix-envcommands include the root user’s channels, which are default set to have nixpkgs. Running
nix-channel --updateas a user in this setup does nothing (updates zero channels).
- Adding a nixpkgs channel as a user (
nix-channel --add https://nixos.org/channels/nixpkgs-unstable) is ignored because there’s already a root channel for nixpkgs,
warning: name collision in input Nix expressions, skipping '/home/$USER/.nix-defexpr/channels_root/nixpkgs'
- I tried removing the root channel so that user channels will work, and it seems to work for the non-root user, but I can’t stick with that because I want to let root have its own channels so that it can install some system-wide services into its own profile.
So what is the recommended setup to let my root user and non-root users have independent channels that they each can update on their own schedules without interfering with one another (and so that users can update their own channels without needing