1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-19 06:01:38 +03:00
digga/profiles/misc/torrent.nix
2019-12-18 00:57:31 -07:00

22 lines
584 B
Nix

{ config, lib, ... }:
let
inherit (config.services.qbittorrent) port;
inherit (lib) mkAfter;
in
{
imports = [ ../../modules/services/torrent/qbittorrent.nix ];
services.qbittorrent.enable = true;
users.users.nrd.extraGroups = [ "qbittorrent" ];
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"""
)
'';
}