modularize time-tracking

This commit is contained in:
Daniel Olsen
2025-02-21 01:49:05 +01:00
parent 4e86eedc2d
commit 4ca2440280
5 changed files with 55 additions and 39 deletions

View File

@@ -0,0 +1,30 @@
{ config, lib, pkgs, overlays, ... }:
let
cfg = config.profiles.timetracking;
in {
options.profiles.timetracking = {
enable = lib.mkEnableOption "doin timetracking";
};
config = lib.mkIf cfg.enable {
services.activitywatch = {
enable = true;
watchers = {
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;
};
};
};
};
};
}