Gen 444: Consolidated desktop/laptop configs into one, differing options are declared in hosts folder
This commit is contained in:
18
modules/home/scripts/nix/nixswitch.nix
Normal file
18
modules/home/scripts/nix/nixswitch.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "nixswitch" (''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
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"
|
||||
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