Vladimír Čunát <[email protected]> writes: >>> # Now this is the problem: >>> $ sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable >>> >>> That created the file $HOME/.nix-channels in my USER home, but with >>> owner root. Obviously not the correct behavior. The following `sudo >>> nix-channel --update` failed (sorry, don't have the error message >>> anymore). Any suggestions for a better way to do this? >> >> sudo -H (see man sudo) > > I believe nix-channel --add is supposed to be run *without* sudo anyway > (it only sets up ~/.nix* stuff AFAIK).
If you add the channel as a user, it will be added to your home directory and you need to run `sudo nixos-rebuild ...`. If you add it as root with `sudo nix-channel ...` it's going to be added to your user's home and you need to run `sudo nixos-rebuild ...`, too. If you add it with `sudo -H nix-channel...`, it will be added to root's home and you need to run `sudo -H nixos-rebuild...`. I'm not sure about security implications, but it feels like one should do both with `-H`. -- Florian Friesdorf <[email protected]> GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083 Jabber/XMPP: [email protected] IRC: chaoflow on freenode,ircnet,blafasel,OFTC
pgpo2HkwOANl2.pgp
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
