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.4 KiB

  1. #!/bin/sh
  2. # vim: set ft=sh sw=2 et :
  3. install_nix() {
  4. # This one courtesy of:
  5. # https://github.com/shadowrylander/shadowrylander/blob/35bb51822c46578d0a5da5810263fa85d464043c/.config/yadm/bootstrap#L56
  6. install_nix_bin() {
  7. # Single User install
  8. # Alternate nix-daemon path: . /nix/var/nix/profiles/per-user/${USER}/profile/etc/profile.d/nix-daemon.sh
  9. # curl -L https://nixos.org/nix/install | sh
  10. #. $HOME/.nix-profile/etc/profile.d/nix.sh
  11. # For Multi-User install
  12. curl -L https://nixos.org/nix/install | sh -s -- --daemon --yes
  13. . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
  14. if [ -f "$HOME/.config/nix/installed_packages" ]; then
  15. # This list created with `nix-env -qaPs|grep '^I'|awk '{print $2}' > ~/.config/nix/installed_packages`
  16. cat "$HOME/.config/nix/installed_packages" | xargs nix-env -iA
  17. fi
  18. }
  19. command -v nix >/dev/null 2>&1 || install_nix_bin
  20. }
  21. configure_zsh() {
  22. # FIXME: We deserve better
  23. source $HOME/.zshrc
  24. }
  25. configure_vim() {
  26. # Install vim-plug for Vim
  27. #curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  28. #vim +'PlugInstall --sync' +qa
  29. # Install vim-plug for Neovim
  30. curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  31. nvim +'PlugInstall --sync' +qa
  32. }
  33. install_nix
  34. #configure_zsh
  35. configure_vim