-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
add service config for hayabusa #381971
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
base: master
Are you sure you want to change the base?
add service config for hayabusa #381971
Conversation
a37ad00
to
234c305
Compare
@Notarin you may want to keep an eye |
FYI, acceptable targets are Windows, Linux, and MacOS. |
Coming back to this, I can now actually give my thoughts on the module. I support this, I basically just wrote a near identical clone upstream. aamof this is better than my upstream implementation and I will be copying this homework. |
serviceConfig = { | ||
Restart = "always"; | ||
Type = "simple"; | ||
ExecStart = "${cfg.package}/bin/hayabusa ${cfg.flags}"; |
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.
ExecStart = "${cfg.package}/bin/hayabusa ${cfg.flags}"; | |
ExecStart = lib.getExe cfg.package; |
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.
Did you remove flags?
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.
Whhops, not removing the flag
ExecStart = "${cfg.package}/bin/hayabusa ${cfg.flags}"; | |
ExecStart = "${lib.getExe cfg.package} ${cfg.flags}"; |
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.
What about the path to bin/hayabusa
? Is that not needed anymore?
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.
hayabusa
is the main program of the derivation, so lib.getExe
retrieves it
... | ||
}: | ||
|
||
with lib; |
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.
We want to avoid using top-level with lib;
expression, because it has many known drawback (including increasing eval times!).
Hayabusa (a fast fetch) has a daemon mode that needs to be managed by systemd. This service config allows users to enable that service via their configuration.nix.
This is my first full service file contribution.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.