-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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/caddy: improve documentation #28481
Conversation
{ | ||
options.services.caddy = { | ||
enable = mkEnableOption "Caddy web server"; | ||
{ |
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.
Thank you for this. We are in nit-picking territory but the indentation is incorrect. It should either be:
in
{
options....
or
in {
options...
That basically throws off the indentation for the rest of the PR.
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.
Ah, I didn't catch that. Thank you. Should've looked more carefully. Fixed now, squashed with the original commit.
root /srv/http | ||
} | ||
''; | ||
type = types.string |
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.
A semicolon is missing here. Also, this should rather be types.lines
so that multiple occurrences of this option will be merged by default.
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.
Oops! Sorry about that. And cool, I wasn't aware of types.lines
. Changes made and squashed with the original commit.
.caddy directory are in the specified data directory instead. | ||
The data directory, for storing certificates. Before 17.09, this | ||
would create a .caddy directory. With 17.09 the contents of the | ||
.caddy directory are in the specified data directory instead. | ||
''; |
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.
indentation is wrong here - should be 2, not 4.
@@ -57,10 +67,10 @@ in | |||
after = [ "network-online.target" ]; | |||
wantedBy = [ "multi-user.target" ]; | |||
environment = mkIf (versionAtLeast config.system.stateVersion "17.09") | |||
{ CADDYPATH = cfg.dataDir; }; | |||
{ CADDYPATH = cfg.dataDir; }; |
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.
should be indented
serviceConfig = { | ||
ExecStart = '' | ||
${cfg.package.bin}/bin/caddy -root=/var/tmp -conf=${configFile} \ | ||
${cfg.package.bin}/bin/caddy -root=/var/tmp -conf=${configFile} \ | ||
-ca=${cfg.ca} -email=${cfg.email} ${optionalString cfg.agree "-agree"} |
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.
shouldn't be indented
There was no documentation for the "config" option, and it wasn't quite clear whether it was supposed to be a file, a string, or what. This commit removes that ambiguity.
Fixed those @peterhoeg, sorry this has been so messy :/ |
Thank you @mpcsh - please keep 'em coming! |
Appreciate the positivity and your being welcoming of a newbie @peterhoeg :) |
Motivation for this change
There was no documentation for the "config" option, and it wasn't quite clear whether it was supposed to be a file, a string, or what. This commit removes that ambiguity.
Things done
(I haven't done any testing because I've only changed documentation)
Also, the diff is a bit messy because the indentation was off, and my editor fixed it.