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

@@ -20,6 +20,8 @@
profiles.games.enable = true;
profiles.timetracking.enable = true;
home.packages = [
pkgs.unstable.osu-lazer-bin
];

View File

@@ -18,31 +18,14 @@
profiles.xsession.enable = true;
profiles.zsh.enable = true;
profiles.games.enable = true;
profiles.timetracking.enable = true;
services.gammastep = {
enable = true;
dawnTime = "7:00-8:15";
duskTime = "21:30-22:30";
};
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;
};
};
};
};
profiles.games.enable = true;
}

View File

@@ -7,5 +7,6 @@
./gui.nix
./non-nixos.nix
./games
./timetracking
];
}

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;
};
};
};
};
};
}