tadpole: Add nginx module

This commit is contained in:
Alexander Heldt
2024-07-21 10:52:42 +02:00
parent 04dfe6a48e
commit 4acb861aa9
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{ lib, config, ... }:
let
enabled = config.mod.nginx.enable;
in
{
options = {
mod.nginx = {
enable = lib.mkEnableOption "add nginx module";
};
};
config = lib.mkIf enabled {
security = {
acme = {
acceptTerms = true;
defaults = {
email = "p@ppp.pm";
};
};
};
services = {
nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
};
networking = {
firewall = {
allowedTCPPorts = [ 80 443 ];
};
};
};
}