config/modules/nixos/services/web/nginx/default.nix

29 lines
542 B
Nix
Raw Normal View History

2024-05-24 11:42:49 -04:00
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.web.nginx;
in {
options.services.web.nginx = with types; {
enable = mkBoolOpt false "Enable NGINX Service";
};
config = mkIf cfg.enable {
services.nginx = {
enable = true;
package = pkgs.nginxStable.override {openssl = pkgs.libressl;};
recommendedProxySettings = true;
virtualHosts = {
"node.nyc.zackmyers.io" = {
forceSSL = true;
enableACME = true;
};
};
};
};
}