summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/torrent/rtorrent.nix
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/2configs/torrent/rtorrent.nix')
-rw-r--r--makefu/2configs/torrent/rtorrent.nix50
1 files changed, 0 insertions, 50 deletions
diff --git a/makefu/2configs/torrent/rtorrent.nix b/makefu/2configs/torrent/rtorrent.nix
deleted file mode 100644
index 87ecc1e19..000000000
--- a/makefu/2configs/torrent/rtorrent.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- basicAuth = import <torrent-secrets/auth.nix>;
- peer-port = 51412;
- web-port = 8112;
- daemon-port = 58846;
- dldir = config.makefu.dl-dir;
-in {
- services.rtorrent = {
- enable = true;
- user = "rtorrent";
- port = peer-port;
- openFirewall = true;
- group = "download";
- downloadDir = dldir;
- configText = ''
- schedule2 = watch_start, 10, 10, ((load.start, (cat, (cfg.watch), "/media/cloud/watch/*.torrent")))
- '';
- };
-
- systemd.services.flood = {
- wantedBy = [ "multi-user.target" ];
- wants = [ "rtorrent.service" ];
- after = [ "rtorrent.service" ];
- serviceConfig = {
- User = "rtorrent";
- ExecStart = "${pkgs.nodePackages.flood}/bin/flood --auth none --port ${toString web-port} --rtsocket ${config.services.rtorrent.rpcSocket}";
- };
- };
-
- #security.acme.certs."torrent.${config.krebs.build.host.name}.r".server = config.krebs.ssl.acmeURL;
-
- services.nginx = {
- enable = true;
- virtualHosts."torrent.${config.krebs.build.host.name}.r" = {
- # TODO
- inherit basicAuth;
- #enableACME = true;
- #addSSL = true;
- root = "${pkgs.nodePackages.flood}/lib/node_modules/flood/dist/assets";
- locations."/api".extraConfig = ''
- proxy_pass http://localhost:${toString web-port};
- '';
- locations."/".extraConfig = ''
- try_files $uri /index.html;
- '';
- };
- };
-}