mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-22 22:09:34 +01:00
32 lines
589 B
Nix
32 lines
589 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
# Suspend system:
|
|
# sudo systemctl suspend
|
|
|
|
# Power consumption:
|
|
# 2.4W powered off
|
|
# 2.6W suspended, with 1 RAM, 1 SSD
|
|
|
|
# journalctl -u regular-wakeup
|
|
|
|
systemd.timers."regular-wakeup" = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
timerConfig = {
|
|
OnCalendar = [
|
|
# Testing
|
|
"Sun 16:15:00"
|
|
# Daily
|
|
# *-*-* 00:00:05
|
|
];
|
|
WakeSystem = true;
|
|
};
|
|
};
|
|
systemd.services."regular-wakeup" = {
|
|
script = ''
|
|
set -eu -o pipefail
|
|
printf '%s%s\n' 'Wokeup at ' "$(date)"
|
|
'';
|
|
};
|
|
}
|