changed my overlay packages to use 'with lib.maintainers [ pagedMov ]' since my name is on the maintainers list now :D also added a -a flag to rebuild to rebuild both home and system configurations

This commit is contained in:
2024-11-15 01:03:07 -05:00
parent 5ba8f79b67
commit 5cd144ef33
3 changed files with 5 additions and 22 deletions

View File

@@ -4,11 +4,12 @@ pkgs.writeShellApplication {
text = ''
hooray() { scheck && runbg aplay ${self}/assets/sound/update.wav; }
damn() { scheck && runbg aplay ${self}/assets/sound/error.wav; }
[ $# -eq 0 ] && echo -e "\033[1;4;38;2;243;139;168mUsage\033[0m: rebuild -h for home config, rebuild -s for sys config" && damn && exit 1
[ $# -eq 0 ] && echo -e "\033[1;4;38;2;243;139;168mUsage\033[0m: rebuild -h for home config, rebuild -s for sys config, rebuild -a for both" && damn && exit 1
scheck && runbg aplay ${self}/assets/sound/nixswitch-start.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;;
"-a" ) if sudo sleep 0.1 && nh os switch -H ${host} "$FLAKEPATH" && nh home switch -c ${host}Home "$FLAKEPATH"; then hooray; else damn; fi;;
* ) echo -e "\033[1;4;38;2;243;139;168mUsage\033[0m: rebuild -h for home config, rebuild -s for sys config";;
esac
'';