1
0
Fork 0

Fix sudo wrapper

This commit is contained in:
Malte Brandy 2021-07-09 01:55:57 +02:00
parent 8cb7a5b88e
commit c20f4f5535
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ let
night = (hour < 6 && hour >= 1) night = (hour < 6 && hour >= 1)
action action
| evening = notify_send "Shutdown alert!" ([i|Rechner fährt in #{59-minute} Minuten runter.|]::String) | evening = notify_send "Shutdown alert!" ([i|Rechner fährt in #{59-minute} Minuten runter.|]::String)
| night = exe "/run/current-system/sw/bin/sudo" "systemctl" "shutdown" | night = exe "/run/wrappers/bin/sudo" "systemctl" "shutdown"
| otherwise = pass | otherwise = pass
action action
threadDelay 600000000 threadDelay 600000000

View file

@ -20,7 +20,7 @@ in
${configGit} merge --ff-only origin/master master ${configGit} merge --ff-only origin/master master
${configGit} submodule update ${configGit} submodule update
${updateModes}/bin/update-modes ${updateModes}/bin/update-modes
/run/current-system/sw/bin/sudo -A /run/current-system/sw/bin/update-system /run/wrappers/bin/sudo -A /run/current-system/sw/bin/update-system
''; '';
activateMode = pkgs.writeHaskellScript { name = "activate-mode"; } '' activateMode = pkgs.writeHaskellScript { name = "activate-mode"; } ''
getMode :: IO Text getMode :: IO Text