nix-config/nginx.nix
Vinzenz Schroeter 480c4a556c initial commit
2025-06-07 19:32:00 +02:00

39 lines
832 B
Nix

{ pkgs, mkWwwContent, ... }:
{
security.acme = {
acceptTerms = true;
defaults.email = "acme@zerforschen.plus";
};
security.pam.services.nginx.setEnvironment = false;
systemd.services.nginx.serviceConfig = {
SupplementaryGroups = [ "shadow" ];
};
services.nginx = {
enable = true;
additionalModules = [ pkgs.nginxModules.pam ];
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
virtualHosts = {
"nix-www.cccb.zerforschen.plus" = {
addSSL = true;
enableACME = true;
root = mkWwwContent {
domain = "nix-www.cccb.zerforschen.plus";
inherit (pkgs) system;
};
};
};
};
networking.firewall.allowedTCPPorts = [
80
443
];
}