nix-git/hosts/yodaHedgehog/host-specific.nix

36 lines
756 B
Nix
Raw Normal View History

2023-11-05 17:21:29 +01:00
{ config, pkgs, ... }:
{
2023-11-08 11:18:16 +01:00
# Suspend:
2023-11-05 17:21:29 +01:00
# sudo systemctl suspend
2023-11-08 11:18:16 +01:00
# Suspend for 60 seconds:
# sudo rtcwake -m mem -s 60
2023-11-05 17:21:29 +01:00
# Power consumption:
2023-11-05 18:40:04 +01:00
# 2.4W powered off, with 1 RAM, 1 SSD
# 2.6W suspended, with 1 RAM, 1 SSD
# 2.6W suspended, with 1 RAM, 1 SSD, 2 HDDs
# 18.9W idle, with 1 RAM, 1 SSD, 2 HDDs
2023-11-05 17:21:29 +01:00
# 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)"
'';
};
}