torrent: use services.flood instead of systemd.services

This commit is contained in:
makefu 2025-01-06 00:15:06 +01:00
parent a500ba0ee1
commit 46ae33a9c9
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225

View file

@ -10,6 +10,7 @@ in {
enable = true;
user = "rtorrent";
port = peer-port;
package = pkgs.jesec-rtorrent;
openFirewall = true;
group = "download";
downloadDir = dldir;
@ -17,16 +18,13 @@ in {
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 --noauth --port ${toString web-port} --rtsocket ${config.services.rtorrent.rpcSocket}";
};
services.flood = {
enable = true;
port = web-port;
extraArgs = ["--auth=none" "--rtsocket=${config.services.rtorrent.rpcSocket}"];
};
# allow access to the socket
systemd.services.flood.serviceConfig.SupplementaryGroups = [ "download" ];
#security.acme.certs."torrent.${config.krebs.build.host.name}.r".server = config.krebs.ssl.acmeURL;
sops.secrets."torrent-auth" = {