mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-22 22:09:34 +01:00
periodic wakeup from suspend
This commit is contained in:
parent
dc5241264e
commit
797253fe53
@ -50,7 +50,7 @@
|
|||||||
#../../modules/ntfs.nix
|
#../../modules/ntfs.nix
|
||||||
#../../modules/veracrypt.nix
|
#../../modules/veracrypt.nix
|
||||||
#../../modules/btrbk
|
#../../modules/btrbk
|
||||||
#../../modules/spin-down.nix # TODO
|
#../../modules/spin-down.nix
|
||||||
|
|
||||||
../../modules/btrfs-scrub.nix
|
../../modules/btrfs-scrub.nix
|
||||||
../../modules/btrfs-mount-options.nix
|
../../modules/btrfs-mount-options.nix
|
||||||
|
@ -1 +1,31 @@
|
|||||||
{}
|
{ 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)"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user