Update nix to 2.18.7 and conditionally add ssl-cert to conf.nix
This commit is contained in:
parent
9dc7288b77
commit
fa0d2e7077
@ -18,7 +18,7 @@ if [ "${USER:-}" == "root" ] || [ "${UID:-}" == "0" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Download the Nix installer and it's signature from NixOS.org
|
# Download the Nix installer and it's signature from NixOS.org
|
||||||
curl -so install-nix https://releases.nixos.org/nix/nix-2.18.1/install
|
curl -so install-nix https://releases.nixos.org/nix/nix-2.18.7/install
|
||||||
|
|
||||||
# Run the installer
|
# Run the installer
|
||||||
sh ./install-nix
|
sh ./install-nix
|
||||||
@ -35,7 +35,13 @@ EOF
|
|||||||
rm -f ./install-nix
|
rm -f ./install-nix
|
||||||
|
|
||||||
# Enable flakes and the nix command
|
# Enable flakes and the nix command
|
||||||
mkdir -p ~/.config/nix
|
NIX_CONF_DIR=~/.config/nix
|
||||||
cat <<EOF > ~/.config/nix/nix.conf
|
NIX_CONF_FILE=${NIX_CONF_DIR}/nix.conf
|
||||||
|
mkdir -p ${NIX_CONF_DIR}
|
||||||
|
cat <<EOF > ${NIX_CONF_FILE}
|
||||||
experimental-features = flakes nix-command
|
experimental-features = flakes nix-command
|
||||||
EOF
|
EOF
|
||||||
|
# Conditionally add a link to system certificates for nix
|
||||||
|
if [ -f /etc/ssl/certs/ca-certificates.crt ]; then
|
||||||
|
echo 'ssl-cert-file = /etc/ssl/certs/ca-certificates.crt' >> ${NIX_CONF_FILE}
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user