You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

44 lines
1.5 KiB

#!/bin/sh
# vim: set ft=sh sw=2 et :
install_nix() {
# This one courtesy of:
# https://github.com/shadowrylander/shadowrylander/blob/35bb51822c46578d0a5da5810263fa85d464043c/.config/yadm/bootstrap#L56
install_nix_bin() {
# Single User install
# Alternate nix-daemon path: . /nix/var/nix/profiles/per-user/${USER}/profile/etc/profile.d/nix-daemon.sh
# curl -L https://nixos.org/nix/install | sh
#. $HOME/.nix-profile/etc/profile.d/nix.sh
# For Multi-User install
curl -L https://nixos.org/nix/install | sh -s -- --daemon --yes
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
if [ -f "$HOME/.config/nix/installed_packages" ]; then
# This list created with `nix-env -qaPs|grep '^I'|awk '{print $2}' > ~/.config/nix/installed_packages`
cat "$HOME/.config/nix/installed_packages" | xargs nix-env -iA
fi
}
command -v nix >/dev/null 2>&1 || install_nix_bin
}
configure_zsh() {
# FIXME: We deserve better
source $HOME/.zshrc
}
configure_vim() {
# Install vim-plug for Vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
nvim +'PlugInstall --sync' +qa
# Install vim-plug for Neovim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
nvim +'PlugInstall --sync' +qa
}
install_nix
#configure_zsh
configure_vim