nixos/nginx: allow return to be an int

This commit is contained in:
Sandro Jäckel 2023-12-08 15:04:11 +01:00
parent 0b5beb5ac5
commit 78541e68eb
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 2 additions and 2 deletions

View file

@ -449,7 +449,7 @@ let
${optionalString (config.tryFiles != null) "try_files ${config.tryFiles};"} ${optionalString (config.tryFiles != null) "try_files ${config.tryFiles};"}
${optionalString (config.root != null) "root ${config.root};"} ${optionalString (config.root != null) "root ${config.root};"}
${optionalString (config.alias != null) "alias ${config.alias};"} ${optionalString (config.alias != null) "alias ${config.alias};"}
${optionalString (config.return != null) "return ${config.return};"} ${optionalString (config.return != null) "return ${toString config.return};"}
${config.extraConfig} ${config.extraConfig}
${optionalString (config.proxyPass != null && config.recommendedProxySettings) "include ${recommendedProxyConfig};"} ${optionalString (config.proxyPass != null && config.recommendedProxySettings) "include ${recommendedProxyConfig};"}
${mkBasicAuth "sublocation" config} ${mkBasicAuth "sublocation" config}

View file

@ -93,7 +93,7 @@ with lib;
}; };
return = mkOption { return = mkOption {
type = types.nullOr types.str; type = with types; nullOr (oneOf [ str int ]);
default = null; default = null;
example = "301 http://example.com$request_uri"; example = "301 http://example.com$request_uri";
description = lib.mdDoc '' description = lib.mdDoc ''