From 2e2ac306a9fe75ec85aaa9a67a80d50ddd51578b Mon Sep 17 00:00:00 2001 From: dimti Date: Wed, 12 Apr 2023 10:47:44 +0300 Subject: [PATCH] - remove vim from the nix packages because for adding plugins to neovim - need use nvim command, not vim * install nixpkgs in multi user mode - remove configure tmux plugin, because plugins does not exists on yadm bootstrap stage - that automatically configured via tmux started in tmux.conf --- .config/nix/installed_packages | 1 - .config/yadm/bootstrap | 45 +++++++++++++++++------------------------- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/.config/nix/installed_packages b/.config/nix/installed_packages index 0516a9f..a62652f 100644 --- a/.config/nix/installed_packages +++ b/.config/nix/installed_packages @@ -23,7 +23,6 @@ nixpkgs.starship nixpkgs.tmate nixpkgs.tmux nixpkgs.unzip -nixpkgs.vim nixpkgs.wget nixpkgs.yadm nixpkgs.zplug diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index f2a8b74..d32893d 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -5,49 +5,40 @@ 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 - # TODO: Use that for per-use installation: . /nix/var/nix/profiles/per-user/${USER}/profile/etc/profile.d/nix-daemon.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 + # 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 - . $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 - - 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_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 + 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 } -configure_tmux() { - ~/.tmux/plugins/tpm/bin/install_plugins -} - install_nix #configure_zsh configure_vim -configure_tmux