Autosuspend
services.autosuspend.checks
Checks for activity. For more information, see: - https://autosuspend.readthedocs.io/en/latest/configuration_file.html#activity-check-configuration - https://autosuspend.readthedocs.io/en/latest/available_checks.html
Type: attribute set of (section of an INI file (attrs of INI atom (null, bool, int, float or string)))
Default
{ }
Example
`#!nix { # Basic activity check configuration. # The check class name is derived from the section header (Ping in this case). # Remember to enable desired checks. They are disabled by default. Ping = { hosts = "192.168.0.7"; };
# This check is disabled. Smb.enabled = false;
# Example for a custom check name. # This will use the Users check with the custom name RemoteUsers. # Custom names are necessary in case a check class is used multiple times. # Custom names can also be used for clarification. RemoteUsers = { class = "Users"; name = "."; terminal = "."; host = "[0-9].*"; };
# Here the Users activity check is used again with different settings and a different name LocalUsers = { class = "Users"; name = "."; terminal = "."; host = "localhost"; }; } `
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.checks.<name>.class
Name of the class implementing the check. If this option is not specified, the check's name must represent a valid internal check class.
Type: null or one of "ActiveCalendarEvent", "ActiveConnection", "ExternalCommand", "JsonPath", "Kodi", "KodiIdleTime", "LastLogActivity", "Load", "LogindSessionsIdle", "Mpd", "NetworkBandwidth", "Ping", "Processes", "Smb", "Users", "XIdleTime", "XPath"
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.checks.<name>.enabled
Whether to enable this activity check.
Type: boolean
Default
true
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.enable
Whether to enable the autosuspend daemon.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.package
The autosuspend package to use.
Type: package
Default
pkgs.autosuspend
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.settings
Configuration for autosuspend, see https://autosuspend.readthedocs.io/en/latest/configuration_file.html#general-configuration for supported values.
Type: section of an INI file (attrs of INI atom (null, bool, int, float or string))
Default
{ }
Example
{enable = true;interval = 30;idle_time = 120;}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.settings.suspend_cmd
The command to execute in case the host shall be suspended. This line can contain additional command line arguments to the command to execute.
Type: string
Default
"systemctl suspend"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.settings.wakeup_cmd
The command to execute for scheduling a wake up of the system. The given string is
processed using Python’s str.format()
and a format argument called timestamp
encodes the UTC timestamp of the planned wake up time (float). Additionally iso
can be used to acquire the timestamp in ISO 8601 format.
Type: string
Default
"sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm && echo {timestamp:.0f} > /sys/class/rtc/rtc0/wakealarm' "
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.wakeups
Checks for wake up. For more information, see: - https://autosuspend.readthedocs.io/en/latest/configuration_file.html#wake-up-check-configuration - https://autosuspend.readthedocs.io/en/latest/available_wakeups.html
Type: attribute set of (section of an INI file (attrs of INI atom (null, bool, int, float or string)))
Default
{ }
Example
{# Wake up checks reuse the same configuration mechanism as activity checks.Calendar = {url = "http://example.org/test.ics";};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.wakeups.<name>.class
Name of the class implementing the check. If this option is not specified, the check's name must represent a valid internal check class.
Type: null or one of "Calendar", "Command", "File", "Periodic", "SystemdTimer", "XPath", "XPathDelta"
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix
services.autosuspend.wakeups.<name>.enabled
Whether to enable this wake-up check.
Type: boolean
Default
true
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/misc/autosuspend.nix