* Subscribe the root user to the NixOS channel by default.

svn path=/nixos/trunk/; revision=33883
This commit is contained in:
Eelco Dolstra 2012-04-22 22:43:57 +00:00
parent d96f330fcf
commit f1a99bd914

View file

@ -85,6 +85,11 @@ if ! test -L $HOME/.nix-profile; then
fi
fi
# Subscribe the root user to the NixOS channel by default.
if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
echo "http://nixos.org/releases/nixos/channels/nixos-unstable nixos" > $HOME/.nix-channels
fi
# Create the per-user garbage collector roots directory.
NIX_USER_GCROOTS_DIR=/nix/var/nix/gcroots/per-user/$USER
mkdir -m 0755 -p $NIX_USER_GCROOTS_DIR