(desktop) Gen 446: Cleaned up broken inputs, altered 'nixswitch' to be interchangeable between hosts, added 'host' attr
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ self, pkgs }:
|
||||
{ self, pkgs, host}:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "nixcommit" (''
|
||||
@@ -22,7 +22,7 @@ if [ -n "$diffcheck" ]; then
|
||||
exit
|
||||
fi
|
||||
git add .
|
||||
git commit -m "Gen $gen: $1"
|
||||
git commit -m "(${host}) Gen $gen: $1"
|
||||
git push
|
||||
scheck && runbg aplay ${self}/media/sound/gitpush.wav
|
||||
builtin cd - || exit
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ self, pkgs }:
|
||||
{ host, self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "nixswitch" (''
|
||||
@@ -8,11 +8,11 @@ scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
|
||||
builtin cd "$HOME/sysflakes" || exit
|
||||
|
||||
nix flake update
|
||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse-desktop"
|
||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#${host}"
|
||||
if [ $? -eq 0 ]; then
|
||||
scheck && runbg aplay ${self}/media/sound/update.wav
|
||||
else
|
||||
scheck && runbg aplay ${self}/media/sound/error.wav
|
||||
fi
|
||||
builtin cd "$OLDPWD" || exit
|
||||
'')
|
||||
'')
|
||||
|
||||
Reference in New Issue
Block a user