nixos/nginx: add locations."name".uwsgiPass and related options and use it

This commit is contained in:
Sandro Jäckel
2024-10-06 02:05:32 +02:00
parent 73bed75dbd
commit d1a28bbdb4
3 changed files with 83 additions and 2 deletions

View File

@@ -56,6 +56,16 @@ with lib;
'';
};
uwsgiPass = mkOption {
type = types.nullOr types.str;
default = null;
example = "unix:/run/example/example.sock";
description = ''
Adds uwsgi_pass directive and sets recommended proxy headers if
recommendedUwsgiSettings is enabled.
'';
};
index = mkOption {
type = types.nullOr types.str;
default = null;
@@ -137,5 +147,14 @@ with lib;
Enable recommended proxy settings.
'';
};
recommendedUwsgiSettings = mkOption {
type = types.bool;
default = config.services.nginx.recommendedUwsgiSettings;
defaultText = literalExpression "config.services.nginx.recommendedUwsgiSettings";
description = ''
Enable recommended uwsgi settings.
'';
};
};
}