{ description = "NixOS Nginx server"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; }; outputs = { self, nixpkgs, ... }: { nixosModules.nginx = { config, lib, pkgs, ... }: let cfg = config.nginx; in { options.nginx = { enable = lib.mkOption {type = lib.types.bool;}; }; config = lib.mkIf cfg.enable { # https://letsencrypt.org/repository/#let-s-encrypt-subscriber-agreement security.acme.acceptTerms = true; services.nginx = { enable = true; recommendedGzipSettings = true; recommendedOptimisation = true; recommendedProxySettings = true; recommendedTlsSettings = true; }; }; }; }; }