summaryrefslogtreecommitdiffstats
path: root/lass/1systems
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-12-05 09:02:31 +0100
committerlassulus <lassulus@lassul.us>2018-12-05 09:02:31 +0100
commite4750d38e76db94a0b255fa143408b8cbe38b61b (patch)
treecf58197521874028cd8a80c8fd1431d9d3cf6206 /lass/1systems
parent29998a8a355d7eec2d11801a3775125608d169a9 (diff)
l yellow.r: use fancyindex
Diffstat (limited to 'lass/1systems')
-rw-r--r--lass/1systems/yellow/config.nix35
1 files changed, 31 insertions, 4 deletions
diff --git a/lass/1systems/yellow/config.nix b/lass/1systems/yellow/config.nix
index 48d405111..ff7b23687 100644
--- a/lass/1systems/yellow/config.nix
+++ b/lass/1systems/yellow/config.nix
@@ -34,10 +34,37 @@ with import <stockholm/lib>;
services.nginx = {
enable = true;
- virtualHosts."yellow.r".locations."/dl".extraConfig = ''
- autoindex on;
- alias /var/download/finished;
- '';
+ package = pkgs.nginx.override {
+ modules = with pkgs.nginxModules; [
+ fancyindex
+ ];
+ };
+ virtualHosts."dl" = {
+ default = true;
+ locations."/Nginx-Fancyindex-Theme-dark" = {
+ extraConfig = ''
+ alias ${pkgs.fetchFromGitHub {
+ owner = "Naereen";
+ repo = "Nginx-Fancyindex-Theme";
+ rev = "e84f7d6a32085c2b6238f85f5fdebe9ceb710fc4";
+ sha256 = "0wzl4ws2w8f0749vxfd1c8c21p3jw463wishgfcmaljbh4dwplg6";
+ }}/Nginx-Fancyindex-Theme-dark;
+ autoindex on;
+ '';
+ };
+ locations."/" = {
+ root = "/var/download/finished";
+ extraConfig = ''
+ fancyindex on;
+ fancyindex_header "/Nginx-Fancyindex-Theme-dark/header.html";
+ fancyindex_footer "/Nginx-Fancyindex-Theme-dark/footer.html";
+ dav_methods PUT DELETE MKCOL COPY MOVE;
+
+ create_full_put_path on;
+ dav_access all:r;
+ '';
+ };
+ };
};
krebs.iptables = {