From 8511a3378b3a26497bcff1a3acb292a0f300886f Mon Sep 17 00:00:00 2001 From: Mark Cohen Date: Tue, 22 Aug 2017 17:21:49 -0400 Subject: 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. --- nixos/modules/services/web-servers/caddy.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/web-servers/caddy.nix b/nixos/modules/services/web-servers/caddy.nix index ee32a1c86d4..d8efa24bc6d 100644 --- a/nixos/modules/services/web-servers/caddy.nix +++ b/nixos/modules/services/web-servers/caddy.nix @@ -5,12 +5,22 @@ with lib; let cfg = config.services.caddy; configFile = pkgs.writeText "Caddyfile" cfg.config; -in -{ +in { options.services.caddy = { enable = mkEnableOption "Caddy web server"; config = mkOption { + default = ""; + example = '' + example.com { + gzip + minify + log syslog + + root /srv/http + } + ''; + type = types.lines; description = "Verbatim Caddyfile to use"; }; -- cgit 1.4.1