···101101 fi
102102 }
103103104104+ download_nixpkgs_cache_index () {
105105+ filename="index-$(uname -m | sed 's/^arm64$/aarch64/')-$(uname | tr A-Z a-z)"
106106+ mkdir -p ~/.cache/nix-index && cd ~/.cache/nix-index
107107+ # -N will only download a new version if there is an update.
108108+ wget -q -N https://github.com/nix-community/nix-index-database/releases/latest/download/$filename
109109+ ln -f $filename files
110110+ }
104111105112 # Setup aliases.
106113 alias -- grep='grep --color=auto'