remove nixos-switch.log

This commit is contained in:
joygnu 2024-08-11 08:45:09 +02:00
parent 1288fdb298
commit 045d8e7535
2 changed files with 4 additions and 2 deletions

View file

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

View file

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