fully fleshed out nixd settings and switch to nvim-cmp from COQ. Also updated rebuild to work for both home and system configs

This commit is contained in:
pagedmov
2024-11-07 00:30:18 -05:00
parent fc99570fdc
commit f9fe7155de
4 changed files with 83 additions and 36 deletions

View File

@@ -6,13 +6,15 @@
pkgs.writeShellApplication {
name = "rebuild";
text = ''
[ $# -eq 0 ] && echo "Usage: rebuild -h for home config, rebuild -s for sys config"
scheck && runbg aplay ${self}/assets/sound/nixswitch-start.wav
set -e
nh os switch -H ${host} "$HOME"/.sysflake
if sudo nixos-rebuild switch --flake "$HOME/.sysflake#${host}"; then
scheck && runbg aplay ${self}/assets/sound/update.wav
else
scheck && runbg aplay ${self}/assets/sound/error.wav
fi
hooray() { scheck && runbg aplay ${self}/assets/sound/update.wav }
damn() { scheck && runbg aplay ${self}/assets/sound/error.wav }
case $1 in
"-h" ) if nh home switch -c ${host}Home "$FLAKEPATH"; then hooray; else damn; fi;;
"-s" ) if nh os switch -H ${host} "$FLAKEPATH"; then hooray; else damn; fi;;
* ) echo "Usage: rebuild -h for home config, rebuild -s for sys config";;
esac
'';
}