removed mkbackup script, refactored all script files to use pkgs.writeShellApplication rather than pkgs.writeShellScriptBin

This commit is contained in:
pagedmov
2024-11-06 18:17:29 -05:00
parent ad22e5a0b1
commit a53bae9870
18 changed files with 497 additions and 416 deletions

View File

@@ -3,16 +3,16 @@
self,
pkgs,
}:
pkgs.writeShellScriptBin "rebuild" ''
#!/run/current-system/sw/bin/bash
scheck && runbg aplay ${self}/assets/sound/nixswitch-start.wav
set -e
nh os switch -H ${host} $HOME/.sysflake
sudo nixos-rebuild switch --flake "$HOME/.sysflake#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/assets/sound/update.wav
else
scheck && runbg aplay ${self}/assets/sound/error.wav
fi
''
pkgs.writeShellApplication {
name = "rebuild";
text = ''
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
'';
}