|
|
@ -6,9 +6,13 @@ install_nix() { |
|
|
|
# https://github.com/shadowrylander/shadowrylander/blob/35bb51822c46578d0a5da5810263fa85d464043c/.config/yadm/bootstrap#L56 |
|
|
|
install_nix_bin() { |
|
|
|
curl -L https://nixos.org/nix/install | sh |
|
|
|
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 |
|
|
|
|
|
|
|
# TODO: Use that for per-use installation: . /nix/var/nix/profiles/per-user/${USER}/profile/etc/profile.d/nix-daemon.sh |
|
|
|
# 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 |
|
|
|
|
|
|
|
. $HOME/.nix-profile/etc/profile.d/nix.sh |
|
|
|
} |
|
|
|
command -v nix >/dev/null 2>&1 || install_nix_bin |
|
|
|
|
|
|
|