nixos/services/caddy.nix
Evie Litherland-Smith fa74d8a36d Update static website URLs and redirects
Swap order for main URLs, without www no redirects to with www

Remove blog subdomain, make a page under normal site
2024-05-04 10:11:02 +01:00

23 lines
518 B
Nix

{...}: {
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;
ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"];
bantime-increment = {enable = true;};
};
}