niksos/hosts/chmura/acme.nix

20 lines
513 B
Nix

_: {
users.users.caddy.extraGroups = [ "acme" ];
services.caddy = {
enable = true;
virtualHosts."acmechallenge.jacekpoz.pl" = {
serverAliases = [ "*.jacekpoz.pl" ];
extraConfig = ''
/.well-known/acme-challenge {
root * /var/lib/acme/.challenges
file_server
}
/ {
respond 301 https://$host$request_uri
}
'';
};
};
}