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.activitywatch.enable

Whether to enable ActivityWatch, an automated time tracker.

Type: boolean

Default:

false

Example:

true

Declared by:

services.activitywatch.package

The activitywatch package to use. Specifically, this should be a package containing the Rust implementation of ActivityWatch server.

Type: package

Default:

pkgs.activitywatch

Example:

pkgs.aw-server-rust

Declared by:

services.activitywatch.extraOptions

Additional arguments to be passed on to the ActivityWatch server.

Type: list of string

Default:

[ ]

Example:

[
  "--port"
  "5999"
]

Declared by:

services.activitywatch.settings

Configuration for aw-server-rust to be generated at $XDG_CONFIG_HOME/activitywatch/aw-server-rust/config.toml.

Type: TOML value

Default:

{ }

Example:

{
  port = 3012;

  custom_static = {
    my-custom-watcher = "${pkgs.my-custom-watcher}/share/my-custom-watcher/static";
    aw-keywatcher = "${pkgs.aw-keywatcher}/share/aw-keywatcher/static";
  };
}

Declared by:

services.activitywatch.watchers

Watchers to be included with the service alongside with their configuration.

Check with systemctl --user status "*aw*"

If a configuration is set, a file will be generated in $XDG_CONFIG_HOME/activitywatch/$WATCHER_NAME/$WATCHER_SETTINGS_FILENAME.

Note: The watchers are run with the service manager and the settings format of the configuration is only assumed to be in TOML. Furthermore, it assumes the watcher program is using the official client libraries which has functions to store it in the appropriate location.

Type: attribute set of (submodule)

Default:

{ }

Example:

{
  aw-watcher-afk = {
    package = pkgs.activitywatch;
    settings = {
      timeout = 300;
      poll_time = 2;
    };
  };

  aw-watcher-window = {
    package = pkgs.activitywatch;
    settings = {
      poll_time = 1;
      exclude_title = true;
    };
  };

  my-custom-watcher = {
    package = pkgs.my-custom-watcher;
    executable = "mcw";
    settings = {
      hello = "there";
      enable_greetings = true;
      poll_time = 5;
    };
    settingsFilename = "config.toml";
  };
}

Declared by:

services.activitywatch.watchers.<name>.package

The activitywatch package to use. The derivation containing the watcher executable.

Type: package

Default:

pkgs.activitywatch

Declared by:

services.activitywatch.watchers.<name>.executable

The name of the executable of the watcher. This is useful in case the watcher name is different from the executable. By default, this option uses the watcher name.

Type: string

Default:

"‹name›"

Declared by:

services.activitywatch.watchers.<name>.extraOptions

Extra arguments to be passed to the watcher executable.

Type: list of string

Default:

[ ]

Example:

[
  "--host"
  "127.0.0.1"
]

Declared by:

services.activitywatch.watchers.<name>.name

The name of the watcher. This will be used as the directory name for $XDG_CONFIG_HOME/activitywatch/$NAME when services.activitywatch.watchers.<name>.settings is set.

Type: string

Default:

"‹name›"

Example:

"aw-watcher-afk"

Declared by:

services.activitywatch.watchers.<name>.settings

The settings for the individual watcher in TOML format. If set, a file will be generated at $XDG_CONFIG_HOME/activitywatch/$NAME/$FILENAME.

To set the basename of the settings file, see .

Type: TOML value

Default:

{ }

Example:

{
  poll_time = 2;
  timeout = 300;
}

Declared by:

services.activitywatch.watchers.<name>.settingsFilename

The filename of the generated settings file. By default, this uses the watcher name to be generated at $XDG_CONFIG_HOME/activitywatch/$NAME/$NAME.toml.

This is useful in case the watcher requires a different name for the configuration file.

Type: string

Default:

"‹name›.toml"

Example:

"config.toml"

Declared by: