Files
nixos-configs/hosts/tadpole/modules/nginx/default.nix
Alexander Heldt f15701f426 Apply nixfmt
2024-09-02 21:55:41 +02:00

42 lines
618 B
Nix

{ 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
];
};
};
};
}