mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 21:33:11 +01:00
24 lines
547 B
Nix
24 lines
547 B
Nix
{ config, ... }:
|
|
{
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
services.nginx = {
|
|
enable = true;
|
|
recommendedTlsSettings = true;
|
|
recommendedProxySettings = true;
|
|
recommendedGzipSettings = true;
|
|
recommendedOptimisation = true;
|
|
|
|
virtualHosts."${config.networking.domain}" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
root = "/srv/web/${config.networking.domain}";
|
|
};
|
|
};
|
|
security.acme = {
|
|
acceptTerms = true;
|
|
defaults = {
|
|
email = "rouven@${config.networking.domain}";
|
|
};
|
|
};
|
|
}
|