aboutsummaryrefslogtreecommitdiff
path: root/scripts/install-nix-from-closure.sh
diff options
context:
space:
mode:
authorDaniel Fitzpatrick <crinklywrappr@pm.me>2020-07-06 21:59:18 -0500
committerDaniel Fitzpatrick <crinklywrappr@pm.me>2020-07-06 21:59:18 -0500
commitfd42176a21d62039580c6cf6430ee19d8d3b6e1c (patch)
tree998631764e64049f606b2029eb99382a0260dc1c /scripts/install-nix-from-closure.sh
parentc385535c18ec2bd73b60e19bcfeb3c07487010fd (diff)
Add a script to install nix on non-systemd systems.
Diffstat (limited to 'scripts/install-nix-from-closure.sh')
-rw-r--r--scripts/install-nix-from-closure.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 5824c2217..906e7da9b 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -35,7 +35,7 @@ fi
# Determine if we could use the multi-user installer or not
if [ "$(uname -s)" = "Darwin" ]; then
echo "Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation" >&2
-elif [ "$(uname -s)" = "Linux" ] && [ -e /run/systemd/system ]; then
+elif [ "$(uname -s)" = "Linux" ]; then
echo "Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation" >&2
fi
@@ -122,9 +122,15 @@ if [ "$(uname -s)" = "Darwin" ]; then
fi
if [ "$INSTALL_MODE" = "daemon" ]; then
- printf '\e[1;31mSwitching to the Daemon-based Installer\e[0m\n'
- exec "$self/install-multi-user"
- exit 0
+ if [ -e /run/systemd/system ]; then
+ printf '\e[1;31mSwitching to the Systemd Daemon-based Installer\e[0m\n'
+ exec "$self/install-multi-user"
+ exit 0
+ else
+ printf '\e[1;31mSwitching to the Non-Systemd Daemon-based Installer\e[0m\n'
+ exec "$self/install-generic-multi-user"
+ exit 0
+ fi
fi
if [ "$(id -u)" -eq 0 ]; then