nixos/services/caddy.nix

23 lines
518 B
Nix
Raw Normal View History

2024-01-30 14:21:50 +00:00
{...}: {
networking.firewall.allowedTCPPorts = [80 443];
services.caddy = {
enable = true;
email = "evie@xenia.me.uk";
virtualHosts = {
"xenia.me.uk".extraConfig = ''
redir https://www.xenia.me.uk
'';
"www.xenia.me.uk".extraConfig = ''
file_server * {
root /var/www/xenia.me.uk/
}
'';
};
};
services.fail2ban = {
enable = true;
2024-01-30 14:21:50 +00:00
ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"];
bantime-increment = {enable = true;};
};
}