blob: 82a0dfb4a9be9e0a34fc15300525c70376683b62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{inputs, pkgs, ...}: let
domain = "kassouni.net";
in {
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
# dont serve kassouni.net traffic to other subdomains
"_" = {
default = true;
rejectSSL = true;
locations."/".return = 444;
};
${domain} = {
forceSSL = true;
enableACME = true;
root = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.website;
};
};
};
security.acme = {
acceptTerms = true;
defaults.email = "alex@${domain}";
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}
|