* initial commit - dotfiles based on DoomHammer
This commit is contained in:
		
							
								
								
									
										49
									
								
								.config/yadm/bootstrap
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										49
									
								
								.config/yadm/bootstrap
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,49 @@
 | 
			
		||||
#!/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() {
 | 
			
		||||
    curl -L https://nixos.org/nix/install | sh
 | 
			
		||||
    if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
 | 
			
		||||
      . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
 | 
			
		||||
    fi
 | 
			
		||||
  }
 | 
			
		||||
  command -v nix >/dev/null 2>&1 || install_nix_bin
 | 
			
		||||
 | 
			
		||||
  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
 | 
			
		||||
  if [ -f "$HOME/.config/nix/installed_packages.local" ]; then
 | 
			
		||||
    # Additional packages that might be needed here or there
 | 
			
		||||
    cat "$HOME/.config/nix/installed_packages.local" | xargs nix-env -i
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#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
 | 
			
		||||
  vim +'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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configure_tmux() {
 | 
			
		||||
  ~/.tmux/plugins/tpm/bin/install_plugins
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
install_nix
 | 
			
		||||
 | 
			
		||||
#configure_zsh
 | 
			
		||||
configure_vim
 | 
			
		||||
configure_tmux
 | 
			
		||||
		Reference in New Issue
	
	Block a user