remove nixos-switch.log

This commit is contained in:
joy 2024-08-11 08:45:09 +02:00
parent 0fd1051253
commit d6d4bd83e4
2 changed files with 4 additions and 2 deletions

View file

@ -10,12 +10,12 @@
]; ];
listener = [ listener = [
{ {
timeout = 300; timeout = 600;
on-timeout = "hyprctl dispatch dpms off"; on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on"; on-resume = "hyprctl dispatch dpms on";
} }
{ {
timeout = 600; timeout = 1200;
on-timeout = "systemctl suspend"; on-timeout = "systemctl suspend";
on-resume = "hyprctl dispatch dpms on"; on-resume = "hyprctl dispatch dpms on";
} }

View file

@ -4,6 +4,8 @@ hostname=$(hostname)
if [[ $hostname == *"desktop"* ]]; then if [[ $hostname == *"desktop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#desktop &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false) sudo nixos-rebuild switch --flake ~/nix/#desktop &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false)
rm nixos-switch.log
elif [[ $hostname == *"laptop"* ]]; then elif [[ $hostname == *"laptop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#laptop &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false) sudo nixos-rebuild switch --flake ~/nix/#laptop &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false)
rm nixos-switch.log
fi fi