1 { config, lib, pkgs, ... }:
6 cfg = config.services.arbtt;
10 enable = mkEnableOption (lib.mdDoc "Arbtt statistics capture service");
14 default = pkgs.haskellPackages.arbtt;
15 defaultText = literalExpression "pkgs.haskellPackages.arbtt";
16 description = lib.mdDoc ''
17 The package to use for the arbtt binaries.
23 default = "%h/.arbtt/capture.log";
24 example = "/home/username/.arbtt-capture.log";
25 description = lib.mdDoc ''
26 The log file for captured samples.
30 sampleRate = mkOption {
34 description = lib.mdDoc ''
35 The sampling interval in seconds.
41 config = mkIf cfg.enable {
42 systemd.user.services.arbtt = {
43 description = "arbtt statistics capture service";
44 wantedBy = [ "graphical-session.target" ];
45 partOf = [ "graphical-session.target" ];
49 ExecStart = "${cfg.package}/bin/arbtt-capture --logfile=${cfg.logFile} --sample-rate=${toString cfg.sampleRate}";
55 meta.maintainers = [ maintainers.michaelpj ];