-
Notifications
You must be signed in to change notification settings - Fork 1
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
Default value for socket? #10
Comments
I always advocate for standards, so yes I agree this should be done. I think As for having it as default, which of these make the most sense?
I think 1, because it also allows customizing the default path. It also makes it more clear in the example config. |
Making it live in a subdirectory is fine; I don't have any strong opinions on exactly what the default should be (but then rkeepd needs to create the directory if it doesn't exist). I have a mild preference for 2 so most users won't have to care about the socket at all, but allowing users to override the setting if they for some reason need that. That said, you could do both? |
Makes sense, I suppose a comment on this in the config would be enough to explain the omittance. Is this something you would like to PR? |
I can take a look at this, but to make it non-ugly, I think introducing a configuration parsing crate makes sense. I don't have a preference, do you have any, or should I just look at what's out there? It would be nice to not have the duplication of logic in (The ugly way to do this is something like:
) |
I haven't really used any configuration parsing crates so I actually don't know if it's cleaner or not. I figured serde is automated enough, but I see what you're saying with the WET All we need is a nice hook to run the shellexpand crate on socket/database paths after deserializing. But implementing a whole serde deserialize is kinda tedious for something like this, unfortunately serde-rs/serde#642 isn't on the cards yet, but it would've fit perfectly here, there is however a workaround in the last 2 comments that look interesting. Otherwise I'm actually just thinking having a parse fn in Config impl so you can run This is all assuming a configuration crate isn't WAY easier though. EDIT: If you think a configuration crate is cleaner, go for it. |
Could socket by default just live in
$XDG_RUNTIME_DIR/rkeep.sock
(or similar), if$XDG_RUNTIME_DIR
is set?The text was updated successfully, but these errors were encountered: