28 lines
626 B
Nix
28 lines
626 B
Nix
{...}: {
|
|
networking.firewall.allowedTCPPorts = [80 443];
|
|
services.caddy = {
|
|
enable = true;
|
|
email = "evie@xenia.me.uk";
|
|
virtualHosts = {
|
|
"www.xenia.me.uk".extraConfig = ''
|
|
redir https://xenia.me.uk
|
|
'';
|
|
"xenia.me.uk".extraConfig = ''
|
|
file_server * {
|
|
root /var/www/landing/
|
|
}
|
|
'';
|
|
"blog.xenia.me.uk".extraConfig = ''
|
|
file_server * {
|
|
root /var/www/blog/
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
services.fail2ban = {
|
|
enable = true;
|
|
ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"];
|
|
bantime-increment = {enable = true;};
|
|
};
|
|
}
|