2024-12-27 05:42:42 -08:00
|
|
|
{ lib, config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.permafrost.nginx;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.permafrost.nginx = {
|
|
|
|
enable = lib.mkEnableOption "nginx nixos module";
|
2024-12-27 06:58:10 -08:00
|
|
|
|
2024-12-27 13:40:41 -08:00
|
|
|
certDomains = lib.mkOption {
|
2024-12-27 06:58:10 -08:00
|
|
|
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;
|
|
|
|
};
|
2024-12-27 05:42:42 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.nginx.enable = true;
|
2024-12-27 20:15:01 -08:00
|
|
|
|
2024-12-27 05:42:42 -08:00
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
};
|
|
|
|
}
|