nixos/nginx: add prependConfig options (#416411)

authored by isabelroses.com and committed by GitHub 4ff7ee96 b7994c7f

+14
+14
nixos/modules/services/web-servers/nginx/default.nix
··· 161 161 configFile = 162 162 (if cfg.validateConfigFile then pkgs.writers.writeNginxConfig else pkgs.writeText) "nginx.conf" 163 163 '' 164 + ${cfg.prependConfig} 165 + 164 166 pid /run/nginx/nginx.pid; 165 167 error_log ${cfg.logError}; 166 168 daemon off; ··· 828 830 829 831 If additional verbatim config in addition to other options is needed, 830 832 [](#opt-services.nginx.appendConfig) should be used instead. 833 + ''; 834 + }; 835 + 836 + prependConfig = mkOption { 837 + type = types.lines; 838 + default = ""; 839 + description = '' 840 + Configuration lines prepended to the generated Nginx 841 + configuration file. Can for example be used to load modules. 842 + {option}`prependConfig` can be specified more than once 843 + and its value will be concatenated (contrary to {option}`config` 844 + which can be set only once). 831 845 ''; 832 846 }; 833 847