aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix')
-rw-r--r--infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix b/infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix
index 3d9e391ecf20..f2fc07255725 100644
--- a/infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix
+++ b/infra/libkookie/nixpkgs/nixos/modules/services/web-servers/nginx/location-options.nix
@@ -9,6 +9,34 @@ with lib;
{
options = {
+ basicAuth = mkOption {
+ type = types.attrsOf types.str;
+ default = {};
+ example = literalExample ''
+ {
+ user = "password";
+ };
+ '';
+ description = ''
+ Basic Auth protection for a vhost.
+
+ WARNING: This is implemented to store the password in plain text in the
+ Nix store.
+ '';
+ };
+
+ basicAuthFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ Basic Auth password file for a vhost.
+ Can be created via: <command>htpasswd -c &lt;filename&gt; &lt;username&gt;</command>.
+
+ WARNING: The generate file contains the users' passwords in a
+ non-cryptographically-securely hashed way.
+ '';
+ };
+
proxyPass = mkOption {
type = types.nullOr types.str;
default = null;