Compare commits

..

3 Commits

Author SHA1 Message Date
anmiller
ed643a06f9 Update removal for newer nix profile output 2024-09-30 16:58:09 +00:00
anmiller
c460081637 Update language servers/dev tools 2024-09-30 16:53:04 +00:00
anmiller
2f971627bd Update nix to 2.18.7 and conditionally add ssl-cert to conf.nix 2024-09-30 16:52:40 +00:00
2 changed files with 22 additions and 8 deletions

View File

@ -12,7 +12,7 @@ nix_packages=(
"yq"
"ruby"
"solargraph"
"shellcheck"
# Neovim + Plugin dependencies
"neovim"
@ -20,9 +20,10 @@ nix_packages=(
"fzf"
# Language servers
"helm-ls"
"yaml-language-server"
"lua-language-server"
"helm-ls" # Helm
"yaml-language-server" # Yaml
"lua-language-server" # Lua
"solargraph" # Ruby
# ProgrammingLanguages
"lua52Packages.lua"
@ -40,6 +41,8 @@ nix_packages=(
"kubernetes-helm"
"rancher"
# Remote programming tools
"lemonade"
)
unstable_packages=(
# CVE in NixOS stable version of vault
@ -48,6 +51,9 @@ unstable_packages=(
# Need unstable latest up to date terraform/terragrunt
"terraform"
"terragrunt"
# Language servers
"gitlab-ci-ls"
)
@ -106,7 +112,9 @@ install_nix_packages()
# The name of the package we are going to install, needed to check for presence/uninstall
package_name=packages.x86_64-linux.myPackageCollection
if [ "${nix_packages[*]}" ]; then
if nix profile list | cut -d' ' -f 2 | grep -q "${package_name}"; then
# Updated to process new nix profile format, proper processing probably needs JQ
# But JQ would be another dependency and this is good enough for now
if nix profile list --json | grep -i "\"attrPath\":\"${package_name}\""; then
echo "Removing previous version of profile"
nix profile remove "${package_name}"
fi

View File

@ -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