summaryrefslogtreecommitdiff
path: root/hooks/pre-up/2-nix
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/pre-up/2-nix')
-rwxr-xr-xhooks/pre-up/2-nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/hooks/pre-up/2-nix b/hooks/pre-up/2-nix
new file mode 100755
index 0000000..cfba81f
--- /dev/null
+++ b/hooks/pre-up/2-nix
@@ -0,0 +1,8 @@
+#!/bin/mksh
+
+if ! [ -x "$(command -v nix)" ]; then
+ echo "Installing Nix"
+ sudo install -d -m755 -o $(id -u) -g $(id -g) /nix
+ curl -L https://nixos.org/nix/install | sh
+fi
+