-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnix-install
37 lines (33 loc) · 1.01 KB
/
nix-install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# install nix
if ! command -v nix &> /dev/null
then
echo "nix command not found, installing..."
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
else
echo "nix command already exists"
fi
# install cachix
if ! command -v cachix &> /dev/null
then
echo "cachix command not found, installing..."
nix --experimental-features 'nix-command flakes' profile install nixpkgs#cachix
cachix use devenv
else
echo "cachix command already exists"
fi
# install devenv
if ! command -v devenv &> /dev/null
then
echo "devenv command not found, installing..."
nix --experimental-features 'nix-command flakes' profile install --accept-flake-config github:cachix/devenv/latest
else
echo "devenv command already exists"
fi
# install direnv
if ! command -v direnv &> /dev/null
then
echo "direnv command not found, installing..."
nix --experimental-features 'nix-command flakes' profile install nixpkgs#direnv
else
echo "direnv command already exists"
fi