nixos/caddy: improve documentation
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.
This commit is contained in:
parent
d9b27fa623
commit
8511a3378b
@ -5,12 +5,22 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.caddy;
|
cfg = config.services.caddy;
|
||||||
configFile = pkgs.writeText "Caddyfile" cfg.config;
|
configFile = pkgs.writeText "Caddyfile" cfg.config;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.services.caddy = {
|
options.services.caddy = {
|
||||||
enable = mkEnableOption "Caddy web server";
|
enable = mkEnableOption "Caddy web server";
|
||||||
|
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
|
default = "";
|
||||||
|
example = ''
|
||||||
|
example.com {
|
||||||
|
gzip
|
||||||
|
minify
|
||||||
|
log syslog
|
||||||
|
|
||||||
|
root /srv/http
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
type = types.lines;
|
||||||
description = "Verbatim Caddyfile to use";
|
description = "Verbatim Caddyfile to use";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user