diff options
author | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
commit | 060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch) | |
tree | 2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/torrent | |
parent | cbfcc890e3b76d942b927809bf981a5fa7289e6a (diff) |
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/torrent')
-rw-r--r-- | makefu/2configs/torrent/deluge.nix | 42 | ||||
-rw-r--r-- | makefu/2configs/torrent/rtorrent.nix | 50 |
2 files changed, 0 insertions, 92 deletions
diff --git a/makefu/2configs/torrent/deluge.nix b/makefu/2configs/torrent/deluge.nix deleted file mode 100644 index af965fbe9..000000000 --- a/makefu/2configs/torrent/deluge.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ config, pkgs, ... }: -let - base = config.makefu.dl-dir; - daemon-port = 58846; - peer-port = 51412; - web-port = 8112; - secfile = toString <torrent-secrets> + "/deluge-auth"; - authfile = config.services.deluge.dataDir + "/myauth"; -in { - services.deluge = { - enable = true; - package = pkgs.deluge-2_x; - openFilesLimit = 65355; - declarative = true; - config = { - download_location = base + "/finished"; - allow_remote = true; - inherit daemon-port; - listen_ports = [ peer-port ]; - copy_torrent_file = true; - torrentfiles_location = base + "/torrents"; - max_active_seeding = 50; - max_connections_global = 1000; - max_half_open_connections = 200; - enabled_plugins = [ "AutoAdd" ]; - }; - openFirewall = true; - group = "download"; - authFile = authfile; - web = { - enable = true; - port = web-port; - }; - }; - - #systemd.services.deluged.serviceConfig.ExecStartPre = pkgs.writeDash "install-auth" '' - # install -odeluge "$secfile" "$authfile" - #''; - services.nginx.enable = true; - services.nginx.virtualHosts."torrent.${config.krebs.build.host.name}.r".locations."/" = { proxyPass = "http://localhost:${toString web-port}/"; }; - state = [ "/var/lib/deluge/.config/deluge" ]; -} 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; - ''; - }; - }; -} |