1 { config, lib, pkgs, ... }:
6 cfg = config.services.arbtt;
10 enable = mkEnableOption "Arbtt statistics capture service";
12 package = mkPackageOption pkgs [ "haskellPackages" "arbtt" ] { };
16 default = "%h/.arbtt/capture.log";
17 example = "/home/username/.arbtt-capture.log";
19 The log file for captured samples.
23 sampleRate = mkOption {
28 The sampling interval in seconds.
34 config = mkIf cfg.enable {
35 systemd.user.services.arbtt = {
36 description = "arbtt statistics capture service";
37 wantedBy = [ "graphical-session.target" ];
38 partOf = [ "graphical-session.target" ];
42 ExecStart = "${cfg.package}/bin/arbtt-capture --logfile=${cfg.logFile} --sample-rate=${toString cfg.sampleRate}";
48 meta.maintainers = [ ];