2024-01-06 01:19:35 +01:00
|
|
|
# SPDX-FileCopyrightText: 2022 Simon Bruder <simon@sbruder.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2022-08-22 16:32:26 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
sops.secrets = {
|
|
|
|
media-htpasswd.owner = "nginx";
|
|
|
|
media-sb-proxy-auth = {
|
|
|
|
owner = "nginx";
|
|
|
|
sopsFile = ../secrets.yaml;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."media-sb.sbruder.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
basicAuthFile = config.sops.secrets.media-htpasswd.path;
|
|
|
|
|
|
|
|
locations = {
|
|
|
|
"/__nginx-interactive-index-assets__/".alias = "${builtins.filterSource
|
|
|
|
(path: type: baseNameOf path != "default.nix")
|
|
|
|
../../../modules/nginx-interactive-index}/";
|
|
|
|
|
2022-10-07 22:19:58 +02:00
|
|
|
"/" = {
|
2022-08-22 16:32:26 +02:00
|
|
|
extraConfig = ''
|
|
|
|
proxy_pass https://u313368-sub3.your-storagebox.de/;
|
|
|
|
proxy_set_header Host u313368-sub3.your-storagebox.de;
|
|
|
|
include ${config.sops.secrets.media-sb-proxy-auth.path};
|
|
|
|
proxy_buffering off;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|