blob: 476b0b75301dd98b1894fc092702a76aa37812d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
let
pkgs = import <nixpkgs> {};
config = builtins.toFile "Caddyfile" ''
{
admin off
}
:8080
try_files {path}.html {path}
file_server {
root result
}
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
}
log {
format single_field common_log
}
'';
in pkgs.mkShell {
shellHook = "exec ${pkgs.caddy}/bin/caddy run --adapter caddyfile --config ${config}";
}
|