1
0

hosts/storage-2: use secrets for basic auth

This commit is contained in:
2023-05-02 20:40:30 +02:00
parent b60824e796
commit bf0a8a31c3
2 changed files with 13 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
with lib;
@@ -52,7 +52,7 @@ in {
forceSSL = true;
locations."/" = {
alias = "/data/mixcloud/";
basicAuthFile = "/var/src/secrets/nginx/mixcloud.htpasswd";
basicAuthFile = config.age.secrets.mixcloud-htpasswd.path;
extraConfig = ''
autoindex on;
autoindex_exact_size off;
@@ -60,7 +60,7 @@ in {
};
locations."/media/" = {
alias = "/data/media/";
basicAuthFile = "/var/src/secrets/nginx/mixcloud.htpasswd";
basicAuthFile = config.age.secrets.mixcloud-htpasswd.path;
extraConfig = ''
autoindex on;
autoindex_exact_size off;