Update nix to 2.18.7 and conditionally add ssl-cert to conf.nix
This commit is contained in:
parent
55141b696b
commit
2f971627bd
@ -18,7 +18,7 @@ if [ "${USER:-}" == "root" ] || [ "${UID:-}" == "0" ]; then
|
||||
fi
|
||||
|
||||
# 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
|
||||
sh ./install-nix
|
||||
@ -35,7 +35,13 @@ EOF
|
||||
rm -f ./install-nix
|
||||
|
||||
# Enable flakes and the nix command
|
||||
mkdir -p ~/.config/nix
|
||||
cat <<EOF > ~/.config/nix/nix.conf
|
||||
NIX_CONF_DIR=~/.config/nix
|
||||
NIX_CONF_FILE=${NIX_CONF_DIR}/nix.conf
|
||||
mkdir -p ${NIX_CONF_DIR}
|
||||
cat <<EOF > ${NIX_CONF_FILE}
|
||||
experimental-features = flakes nix-command
|
||||
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