ark/profiles/misc/torrent.nix

26 lines
618 B
Nix
Raw Normal View History

2019-12-18 10:57:31 +03:00
{ config, lib, ... }:
let
inherit (config.services.qbittorrent) port;
inherit (lib) mkAfter;
in
{
imports = [ ../../modules/services/torrent/qbittorrent.nix ];
2019-12-19 23:03:15 +03:00
services.qbittorrent = {
enable = true;
group = "media";
};
users.groups.media.members = [ "qbittorrent" ];
2019-12-18 10:57:31 +03:00
environment.etc."xdg/qutebrowser/config.py".text = mkAfter ''
c.url.searchengines['to'] = 'https://torrentz2.eu/search?f={}'
config.bind(',t', """hint all spawn curl -X POST\
-F "urls={hint-url}"\
-F "sequentialDownload=true"\
http://localhost:${toString port}/api/v2/torrents/add"""
)
'';
}