
The expression should check if the actually used nginx package needes write+execute rights, not the default pkgs.nginx (which has no modules unless overridden in an overlay). Having MemoryDenyWriteExecute always true causes e.g. the Lua module to fail (because JIT compilation).
*** NixOS *** NixOS is a Linux distribution based on the purely functional package management system Nix. More information can be found at https://nixos.org/nixos and in the manual in doc/manual.