-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
rustic-rs: add systemd files #291353
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?
rustic-rs: add systemd files #291353
Conversation
NobbZ
left a comment
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.
Don't you think we need to patch them?
They have a hardcoded /usr/bin/rustic in the ExecStart.
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.
Shells are lucky to end in sh!
NobbZ
left a comment
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.
Please see #291353 (review).
I hit the wrong button, only realized as ofBorg re-requested a review and therefore got this in my inbox again.
|
@NobbZ thank you for the comment. I myself didnt know this until recently, but nixpkgs can work with any systemd files, the problematic settings are jusy overriden in the module. For the execstart there is a bit of a weird syntax to override it, but thats how its done in other places. |
I'm aware of these, and even can kind of explain to myself how this works. Still, I'd prefer if we had some unit files that would work out of the box in If it doesn't work that way, we can just write the |
|
@NobbZ The benefit of trying to use uptream is that you get upstream knowledge about how things should work. Personally I just want a service, I was just planning on copying the restic service and testing it works. Since you are the maintainer, if you prefer to close this PR and just have a copy as is of restic (tested of course). That works for me too. let me know what you like best, happy to go both ways. |
|
As said, my prefered way was to path the I am fine though with merging as is, and iterating over it. |
0918e76 to
9f8e262
Compare
|
Alright I've pushed a copy of the restic module and will test tonight. @NobbZ I think I understand your point. If we do it with a patch though, we might have to recreate the patch when the systemd file gets updated. I'm not sure how do it with substituteInPlace, were you thinking of just removing that line from the original file ? |
9f8e262 to
30dd39c
Compare
30dd39c to
de75b33
Compare
I do not like that users need to understand
I really like if a drvs output is compatible to The substitituteInPlace rustic.service --replace ExecStart=/usr/bin/rustic ExecStart=$out/bin/rusticI will also start the review in a minute. |
|
@NobbZ no need to start a review yet. Im still changing the module. Ill mark the Pr as draft until im done. Rustic seems to use more of a config.toml style, so im trying to use that more. |
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.
Looks good to me on a first glance, though I am missing support for profiles, which might be needed to get OpenDAL repos configured.
I'm still in favor of getting something "working" in quickly and iterate as we discover additional cases.
|
Any news about this PR ? |
|
Adding the rustic service will need quite a bit of time that i dont have. If you want to take over, yiu can take anything you want. |
|
If anyone is interested, please have a look at #372935 ; I just made a nixos module for it, that includes additional features like automated postgresql dumps to rustic and exporting JSON results as prometheus metrics :) This being said I only tried it out with the REST server backend, so it's very possible that I'm missing some configuration parameters for OpenDAL and/or rclone. Please let me know if there's anything in the API that would be impossible to support with these; and if not we can hopefully land and incrementally improve on it! |
Description of changes
adding systemd files in preparation for making a service
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.