2019-12-18 07:57:31 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
inherit (config.services.qbittorrent) port;
|
|
|
|
inherit (lib) mkAfter;
|
2020-01-04 05:06:31 +00:00
|
|
|
in {
|
2019-12-19 20:03:15 +00:00
|
|
|
services.qbittorrent = {
|
|
|
|
enable = true;
|
|
|
|
group = "media";
|
2020-01-01 23:24:36 +00:00
|
|
|
openFirewall = true;
|
2019-12-19 20:03:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
users.groups.media.members = [ "qbittorrent" ];
|
2019-12-18 07:57:31 +00: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"""
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
}
|