Skip to content

Commit

Permalink
nix-profile.sh: Don't create .nix-channels
Browse files Browse the repository at this point in the history
This is already done by the installer, so no need to do it again.
  • Loading branch information
edolstra committed Oct 9, 2019
1 parent c43d9f6 commit 26762ce
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions scripts/nix-profile-daemon.sh.in
Expand Up @@ -15,11 +15,6 @@ if test -w $HOME; then
fi
fi

# Subscribe the root user to the NixOS channel by default.
if [ "$USER" = root -a ! -e $HOME/.nix-channels ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels
fi

# Set up a default Nix expression from which to install stuff.
if [ ! -e $HOME/.nix-defexpr -o -L $HOME/.nix-defexpr ]; then
rm -f $HOME/.nix-defexpr
Expand Down
5 changes: 0 additions & 5 deletions scripts/nix-profile.sh.in
Expand Up @@ -22,11 +22,6 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
fi
fi

# Subscribe the user to the unstable Nixpkgs channel by default.
if [ ! -e "$HOME/.nix-channels" ]; then
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > "$HOME/.nix-channels"
fi

# Set up a default Nix expression from which to install stuff.
__nix_defexpr="$HOME"/.nix-defexpr
[ -L "$__nix_defexpr" ] && rm -f "$__nix_defexpr"
Expand Down
1 change: 0 additions & 1 deletion tests/nix-profile.sh
Expand Up @@ -9,4 +9,3 @@ USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh; set"
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh" # test idempotency

[ -L $TEST_HOME/.nix-profile ]
[ -e $TEST_HOME/.nix-channels ]

0 comments on commit 26762ce

Please sign in to comment.