Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

services.swayidle.enable

Whether to enable idle manager for Wayland.

Type: boolean

Default:

false

Example:

true

Declared by:

services.swayidle.package

The swayidle package to use.

Type: package

Default:

pkgs.swayidle

Declared by:

services.swayidle.events

Run command on occurrence of a event.

Type: (submodule) or (list of (attribute set)) convertible to it

Default:

{ }

Example:

{
  "before-sleep" = "${pkgs.swaylock}/bin/swaylock -fF";
  "lock" = "lock";
}

Declared by:

services.swayidle.events.after-resume

Command to run after resuming.

Type: null or string

Default:

null

Declared by:

services.swayidle.events.before-sleep

Command to run before suspending.

Type: null or string

Default:

null

Declared by:

services.swayidle.events.lock

Command to run when the logind session is locked.

Type: null or string

Default:

null

Declared by:

services.swayidle.events.unlock

Command to run when the logind session is unlocked.

Type: null or string

Default:

null

Declared by:

services.swayidle.extraArgs

Extra arguments to pass to swayidle.

Type: list of string

Default:

[
  "-w"
]

Declared by:

services.swayidle.systemdTargets

Systemd targets to bind to.

Type: list of string

Default:

[ config.wayland.systemd.target ]

Example:

[
  "sway-session.target"
]

Declared by:

services.swayidle.timeouts

List of commands to run after idle timeout.

Type: list of (submodule)

Default:

[ ]

Example:

[
  { timeout = 60; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
  { timeout = 90; command = "${pkgs.systemd}/bin/systemctl suspend"; }
]

Declared by:

services.swayidle.timeouts.*.command

Command to run after timeout seconds of inactivity.

Type: string

Declared by:

services.swayidle.timeouts.*.resumeCommand

Command to run when there is activity again.

Type: null or string

Default:

null

Declared by:

services.swayidle.timeouts.*.timeout

Timeout in seconds.

Type: positive integer, meaning >0

Example:

60

Declared by: