permafrost/modules/nginx.nix
2024-12-27 22:43:43 -08:00

28 lines
622 B
Nix

{ lib, config, ... }:
let
cfg = config.permafrost.nginx;
in
{
options.permafrost.nginx = {
enable = lib.mkEnableOption "nginx nixos module";
certDomains = lib.mkOption {
description = "additional domains to register with the ACME cert";
default = [ ];
type = with lib.types; listOf str;
};
useStagingServer = lib.mkOption {
description = "use the letsencrypt staging server";
default = true;
type = with lib.types; bool;
};
};
config = lib.mkIf cfg.enable {
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
};
}