Merge pull request #55 from numtide/idempotent

idempotent installation
This commit is contained in:
Domen Kožar 2020-11-02 19:47:38 +01:00 committed by GitHub
commit 661bbdf5ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
if type -p nix &>/dev/null ; then
echo "Aborting: Nix is already installed at $(type -p nix)"
exit
fi
# Configure Nix
add_config() {
echo "$1" | sudo tee -a /tmp/nix.conf >/dev/null