Add NixOS (just link and install plugins) installation script.

Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
Ivan Bushchik 2023-07-30 15:13:22 +03:00
parent 828a688541
commit 4cd54f90d2
No known key found for this signature in database
GPG key ID: 9F6DDABE11A2674D
3 changed files with 24 additions and 0 deletions

View file

@ -50,6 +50,7 @@ alias timestamp='date -u +%FT%TZ'
alias yt-dlp-opus="yt-dlp -f 251 -x"
alias ltcp="cp ~/.dotfiles/latex_template/{macros,preamble,template,letterfonts}.tex ."
alias jekyll_export="jekyll b -d ./_archive && cd _archive && tar cf ../site.tar ./ && cd .. && gzip -9 -f site.tar && rm -rf _archive"
alias rebuild="sudo nixos-rebuild switch --flake path:/etc/nixos --impure"
# ffmpeg section

11
init_nix Normal file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
if ! command -v git &> /dev/null
then
echo "git should be installed"
exit 255
fi
git clone https://github.com/ivabus/dotfiles $HOME/.dotfiles
exec sh $HOME/.dotfiles/tools/install_nix.sh < /dev/tty

12
tools/install_nix.sh Executable file
View file

@ -0,0 +1,12 @@
#/bin/sh
set -e
mkdir $HOME/.config
./relink.sh
mkdir -p $HOME/.dotfiles/zsh/{plugins,themes}
ZSH="$HOME/.dotfiles/zsh"
echo "Installing zsh theme and plugins"
curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.dotfiles/zsh/themes/ivabus.zsh-theme
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.dotfiles/zsh/plugins/zsh-syntax-highlighting
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 -c :PlugInstall -c :q -c :q