Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

disassembler
Copy link
Member

@disassembler disassembler commented May 19, 2018

Motivation for this change

adds web/api services for hledger

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
preStart = ''
touch ${cfg.statePath}/${cfg.stateFileName}
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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.

@@ -307,6 +307,7 @@
duplicati = 289;
monetdb = 290;
restic = 291;
hledger = 292;
Copy link
Member

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.

@peterhoeg
Copy link
Member

Ah yes, this clearly doesn't make sense to run as a system-wide service. The systemd services should be under systemd.user.services instead and could be a "hledger-web@.service" user services which takes a path as a parameter.

@disassembler
Copy link
Member Author

@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.

@ryantm
Copy link
Member

ryantm commented Feb 23, 2019

This has a probably trivial merge conflict that needs to be resolved.

@mmahut
Copy link
Member

mmahut commented Aug 20, 2019

Are there any updates on this pull request, please?

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 3, 2020
@DamienCassou
Copy link
Contributor

I'm closing because no one raised any interest for months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants