summaryrefslogtreecommitdiffstats
path: root/lass/1systems/yellow
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-12-16 20:28:28 +0100
committerjeschli <jeschli@gmail.com>2018-12-16 20:28:28 +0100
commit8605ac91ae3a3859ab906a5fa2e9b0e3dfcd6e1e (patch)
tree77618847347d2526897e94da744ab57588947567 /lass/1systems/yellow
parent5030b74cc5c578bb82619a24592504a6008f1a10 (diff)
parent8705b4dbc8e8cf0c4e09c114daad3f96026520ab (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'lass/1systems/yellow')
-rw-r--r--lass/1systems/yellow/config.nix44
1 files changed, 39 insertions, 5 deletions
diff --git a/lass/1systems/yellow/config.nix b/lass/1systems/yellow/config.nix
index 48d405111..58fa564a1 100644
--- a/lass/1systems/yellow/config.nix
+++ b/lass/1systems/yellow/config.nix
@@ -19,7 +19,11 @@ with import <stockholm/lib>;
users.groups.download.members = [ "transmission" ];
users.users.transmission.group = mkForce "download";
- systemd.services.transmission.serviceConfig.bindsTo = [ "openvpn-nordvpn.service" ];
+ systemd.services.transmission.bindsTo = [ "openvpn-nordvpn.service" ];
+ systemd.services.transmission.after = [ "openvpn-nordvpn.service" ];
+ systemd.services.transmission.postStart = ''
+ chmod 775 /var/download/finished
+ '';
services.transmission = {
enable = true;
settings = {
@@ -34,10 +38,40 @@ 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."/dl".extraConfig = ''
+ return 301 /;
+ '';
+ 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 = {