2024-01-30 14:21:50 +00:00
|
|
|
{...}: {
|
|
|
|
networking.firewall.allowedTCPPorts = [80 443];
|
2023-11-20 08:19:13 +00:00
|
|
|
services.caddy = {
|
|
|
|
enable = true;
|
|
|
|
email = "evie@xenia.me.uk";
|
2024-02-22 07:05:34 +00:00
|
|
|
virtualHosts = {
|
|
|
|
"xenia.me.uk".extraConfig = ''
|
2024-05-04 10:11:02 +01:00
|
|
|
redir https://www.xenia.me.uk
|
2024-02-22 07:05:34 +00:00
|
|
|
'';
|
2024-05-04 10:11:02 +01:00
|
|
|
"www.xenia.me.uk".extraConfig = ''
|
2024-02-22 07:05:34 +00:00
|
|
|
file_server * {
|
2024-05-04 10:11:02 +01:00
|
|
|
root /var/www/xenia.me.uk/
|
2024-02-22 07:05:34 +00:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
2023-11-20 08:19:13 +00:00
|
|
|
};
|
|
|
|
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;};
|
2023-11-20 08:19:13 +00:00
|
|
|
};
|
|
|
|
}
|