New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arbtt service: init #21570
arbtt service: init #21570
Conversation
@michaelpj, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bjornfor and @offlinehacker to be potential reviewers. |
default = 60; | ||
example = 120; | ||
description = '' | ||
The sampling frequency in seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frequency -> interval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed.
Maybe it is a program that doesn't make a lot of sense as a system-wide service? Their installation instructions are:
So it seems more like a per-user thing. Have you looked at systemd user services? |
Doh, I see you have "systemd.user.services.arbtt" in there :-) |
21be2f4
to
10e2d88
Compare
Yeah, it's already a user service, but it's just that enabling it seems to enable it for all users. I guess there isn't really a sensible way this could work without some kind of user-specific nixos configuration, which doesn't seem to exist yet. |
@michaelpj re per-user systemd user services, see also #21460 |
Were there any other comments on this, or is it good to go? |
Thanks! |
Motivation for this change
This adds a systemd user service for the arbtt time-tracking tool. Since arbtt is a passive tracker, you want it to be automatically running in the background at all times.
The one thing I couldn't work out how to do is to have the service only be enabled for some users. Currently if
arbtt.enable = true
, then the service runs for all users, which seems potentially undesirable.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)