Compare commits
3 Commits
55141b696b
...
ed643a06f9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed643a06f9 | ||
|
|
c460081637 | ||
|
|
2f971627bd |
@ -12,7 +12,7 @@ nix_packages=(
|
|||||||
"yq"
|
"yq"
|
||||||
|
|
||||||
"ruby"
|
"ruby"
|
||||||
"solargraph"
|
"shellcheck"
|
||||||
|
|
||||||
# Neovim + Plugin dependencies
|
# Neovim + Plugin dependencies
|
||||||
"neovim"
|
"neovim"
|
||||||
@ -20,9 +20,10 @@ nix_packages=(
|
|||||||
"fzf"
|
"fzf"
|
||||||
|
|
||||||
# Language servers
|
# Language servers
|
||||||
"helm-ls"
|
"helm-ls" # Helm
|
||||||
"yaml-language-server"
|
"yaml-language-server" # Yaml
|
||||||
"lua-language-server"
|
"lua-language-server" # Lua
|
||||||
|
"solargraph" # Ruby
|
||||||
|
|
||||||
# ProgrammingLanguages
|
# ProgrammingLanguages
|
||||||
"lua52Packages.lua"
|
"lua52Packages.lua"
|
||||||
@ -40,6 +41,8 @@ nix_packages=(
|
|||||||
"kubernetes-helm"
|
"kubernetes-helm"
|
||||||
"rancher"
|
"rancher"
|
||||||
|
|
||||||
|
# Remote programming tools
|
||||||
|
"lemonade"
|
||||||
)
|
)
|
||||||
unstable_packages=(
|
unstable_packages=(
|
||||||
# CVE in NixOS stable version of vault
|
# CVE in NixOS stable version of vault
|
||||||
@ -48,6 +51,9 @@ unstable_packages=(
|
|||||||
# Need unstable latest up to date terraform/terragrunt
|
# Need unstable latest up to date terraform/terragrunt
|
||||||
"terraform"
|
"terraform"
|
||||||
"terragrunt"
|
"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
|
# The name of the package we are going to install, needed to check for presence/uninstall
|
||||||
package_name=packages.x86_64-linux.myPackageCollection
|
package_name=packages.x86_64-linux.myPackageCollection
|
||||||
if [ "${nix_packages[*]}" ]; then
|
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"
|
echo "Removing previous version of profile"
|
||||||
nix profile remove "${package_name}"
|
nix profile remove "${package_name}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -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