Caddy: Difference between revisions
imported>Malteneuss Simplify curl check and add explanation for https |
imported>Malteneuss m Show caddy config as part of whole NixOS module |
||
Line 4: | Line 4: | ||
== Get started == | == Get started == | ||
To try out Caddy add the following minimal example to your NixOS module: | To try out Caddy add the following minimal example to your [https://nixos.wiki/wiki/NixOS_modules NixOS module]: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.caddy = { | { | ||
# ... | |||
config.services.caddy = { | |||
enable = true; | |||
virtualHosts."localhost".extraConfig = '' | |||
}; | respond "Hello, world!" | ||
''; | |||
}; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||