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
nixos/hledger: initial web/api services #40777
Conversation
5122b11
to
6fb190a
Compare
wantedBy = [ "multi-user.target" ]; | ||
after = [ "network.target" ]; | ||
preStart = '' | ||
touch ${cfg.statePath}/${cfg.stateFileName} |
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.
If /var/lib/hledger
does not exist, this line will fail.
This requires mkdir -p ${cfg.statePath}
, followed by touch
and chown
of the stateFileName
.
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.
Better to use StateDirectory = "hledger";
which will handle the creation and chowing automatically.
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.
In general I would agree, however for this service it seems that somebody might prefer to read the file from their own home.
nixos/modules/misc/ids.nix
Outdated
@@ -307,6 +307,7 @@ | |||
duplicati = 289; | |||
monetdb = 290; | |||
restic = 291; | |||
hledger = 292; |
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.
Since this service only needs a single file, we don't need fixed uids for it. Please use remove them here so dynamic ids will be allocated when the service is enabled.
6fb190a
to
1c2d4e4
Compare
1c2d4e4
to
4a75b2a
Compare
Ah yes, this clearly doesn't make sense to run as a system-wide service. The systemd services should be under |
@peterhoeg why wouldn't you want this to run as a system-wide service? I run this on my server that I'm never logged into with an nginx proxy and a systemd user service would only start when logged in. |
This has a probably trivial merge conflict that needs to be resolved. |
Are there any updates on this pull request, please? |
Thank you for your contributions.
|
I'm closing because no one raised any interest for months. |
Motivation for this change
adds web/api services for hledger
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)