mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 01:46:43 +00:00
22 lines
297 B
Bash
22 lines
297 B
Bash
#
|
|
# Nix interative setup
|
|
#
|
|
|
|
sort_nix_paths() {
|
|
local nix_paths=()
|
|
|
|
for p in "${(@)path}"; do
|
|
if [[ "$p" == "/nix/store/"* ]]; then
|
|
nix_paths+=("$p")
|
|
fi
|
|
done
|
|
|
|
for p in "${(@)nix_paths}"; do
|
|
path_prepend "$p"
|
|
done
|
|
}
|
|
|
|
if command-exists nix-shell; then
|
|
sort_nix_paths
|
|
fi
|