fuuko: Add media file index
This commit is contained in:
parent
878bdd30d5
commit
07f152cb20
|
@ -6,6 +6,7 @@
|
|||
../../users/simon
|
||||
|
||||
./services/grafana.nix
|
||||
./services/media.nix
|
||||
./services/prometheus.nix
|
||||
./services/scan.nix
|
||||
];
|
||||
|
|
14
machines/fuuko/services/media.nix
Normal file
14
machines/fuuko/services/media.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
services.nginx.virtualHosts."media.sbruder.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
basicAuthFile = "/data/media/.htpasswd";
|
||||
|
||||
root = "/data/media/";
|
||||
|
||||
locations."=/.htpasswd".return = "403";
|
||||
};
|
||||
|
||||
services.nginx-interactive-index.virtualHosts."media.sbruder.de".locations."/".enable = true;
|
||||
}
|
|
@ -26,7 +26,7 @@ in
|
|||
];
|
||||
locations = {
|
||||
"/".extraConfig = ''
|
||||
rewrite ^/__assets/(.*)$ /media/__assets/$1;
|
||||
rewrite ^/__nginx-interactive-index-assets__/(.*)$ /media/__nginx-interactive-index-assets__/$1;
|
||||
'';
|
||||
} // lib.mapAttrs'
|
||||
(name: secret: {
|
||||
|
|
Loading…
Reference in a new issue