From 3fd3b191177862e0e0044737fd8f382ae30aceee Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 11 Apr 2020 17:13:08 +0200 Subject: l yellow.r: add shoutbox to /flix --- lass/1systems/prism/config.nix | 54 +++++++++++---------- lass/1systems/yellow/config.nix | 101 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 128 insertions(+), 27 deletions(-) (limited to 'lass') diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index cde65ea6..c6e0400b 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -338,30 +338,36 @@ with import ; localAddress = "10.233.2.14"; }; - services.nginx.virtualHosts."lassul.us".locations."^~ /flix/".extraConfig = '' - if ($scheme != "https") { - rewrite ^ https://$host$request_uri permanent; - } - auth_basic "Restricted Content"; - auth_basic_user_file ${pkgs.writeText "flix-user-pass" '' - krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0 - ''}; - proxy_pass http://10.233.2.14:80/; - proxy_set_header Accept-Encoding ""; - sub_filter "https://lassul.us/" "https://lassul.us/flix/"; - sub_filter_once off; - ''; - services.nginx.virtualHosts."lassul.us".locations."^~ /transmission".extraConfig = '' - if ($scheme != "https") { - rewrite ^ https://$host$request_uri permanent; - } - auth_basic "Restricted Content"; - auth_basic_user_file ${pkgs.writeText "transmission-user-pass" '' - krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0 - ''}; - proxy_pass_header X-Transmission-Session-Id; - proxy_pass http://10.233.2.14:9091; - ''; + services.nginx.virtualHosts."lassul.us" = { + locations."^~ /flix/".extraConfig = '' + if ($scheme != "https") { + rewrite ^ https://$host$request_uri permanent; + } + auth_basic "Restricted Content"; + auth_basic_user_file ${pkgs.writeText "flix-user-pass" '' + krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0 + ''}; + proxy_pass http://10.233.2.14:80/; + proxy_set_header Accept-Encoding ""; + sub_filter "https://lassul.us/" "https://lassul.us/flix/"; + sub_filter_once off; + ''; + locations."^~ /chatty/".extraConfig = '' + rewrite ^ https://$host/flix/$request_uri permanent; + ''; + #locations."^~ /transmission".return = "301 https://$host/transmission/web/"; + locations."^~ /transmission/".extraConfig = '' + if ($scheme != "https") { + rewrite ^ https://$host$request_uri permanent; + } + auth_basic "Restricted Content"; + auth_basic_user_file ${pkgs.writeText "transmission-user-pass" '' + krebs:$apr1$1Fwt/4T0$YwcUn3OBmtmsGiEPlYWyq0 + ''}; + proxy_pass_header X-Transmission-Session-Id; + proxy_pass http://10.233.2.14:9091; + ''; + }; users.groups.download = {}; users.users = { diff --git a/lass/1systems/yellow/config.nix b/lass/1systems/yellow/config.nix index abbc0045..82fe3fac 100644 --- a/lass/1systems/yellow/config.nix +++ b/lass/1systems/yellow/config.nix @@ -54,12 +54,107 @@ with import ; root = "/var/download/finished"; extraConfig = '' fancyindex on; - dav_methods PUT DELETE MKCOL COPY MOVE; - + fancyindex_footer "/fancy.html"; + include ${pkgs.nginx}/conf/mime.types; + include ${pkgs.writeText "extrMime" '' + types { + video/webm mkv; + } + ''}; create_full_put_path on; - dav_access all:r; ''; }; + locations."/chatty" = { + proxyPass = "http://localhost:3000"; + extraConfig = '' + rewrite /chatty/(.*) /$1 break; + proxy_set_header Host $host; + ''; + }; + locations."= /fancy.html".extraConfig = '' + alias ${pkgs.writeText "nginx_footer" '' +
+ +
Click here to move
+ +
+ + + ''}; + ''; + }; + }; + + systemd.services.bruellwuerfel = { + wantedBy = [ "multi-user.target" ]; + environment = { + IRC_CHANNEL = "#flix"; + IRC_NICK = "bruelli"; + IRC_SERVER = "irc.r"; + IRC_HISTORY_FILE = "/tmp/bruelli.history"; + }; + serviceConfig = { + ExecStart = "${pkgs.bruellwuerfel}/bin/bruellwuerfel"; }; }; -- cgit v1.2.3