mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-09-11 12:49:18 +03:00
bootstrap: remove profile patch
This commit is contained in:
parent
bfac6569ab
commit
f0e4aabb78
33
bootstrap.sh
33
bootstrap.sh
@ -174,39 +174,6 @@ install(){
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! test -L /etc/profile && grep -q 'etc/profile.d/nix-daemon.sh' /etc/profile; then
|
||||
while true; do
|
||||
read -p "Would you like to remove nix-daemon.sh configuration in /etc/profile? [y/n] " i
|
||||
case "$i" in
|
||||
y|Y)
|
||||
cat <<-'EOF' | sudo patch -d /etc -p1 || exit
|
||||
diff --git a/profile b/profile
|
||||
index 3748e3b..36ad2cd 100644
|
||||
--- a/profile
|
||||
+++ b/profile
|
||||
@@ -7,9 +7,3 @@ fi
|
||||
if [ "${BASH-no}" != "no" ]; then
|
||||
[ -r /etc/bashrc ] && . /etc/bashrc
|
||||
fi
|
||||
-
|
||||
-# Nix
|
||||
-if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
|
||||
- . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
||||
-fi
|
||||
-# End Nix
|
||||
EOF
|
||||
break
|
||||
;;
|
||||
n|N)
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Please answer 'y' or 'n'..."
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# Bootstrap build using default nix.nixPath
|
||||
echo "Bootstrapping..."
|
||||
export NIX_PATH=darwin=$HOME/.nix-defexpr/channels/darwin:darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$NIX_PATH
|
||||
|
Loading…
Reference in New Issue
Block a user