nixos/hosts/architect/deluge.nix

57 lines
1.2 KiB
Nix
Raw Normal View History

2022-03-15 15:58:04 +00:00
{ lib, config, pkgs, ... }:
let
domain = "htdel.giugl.io";
listenPorts = [ 51413 51414 ];
2023-02-11 02:29:48 +00:00
in
{
architect.firewall = {
openTCP = listenPorts;
openUDP = listenPorts;
};
2022-03-15 15:58:04 +00:00
services = {
deluge = {
enable = true;
group = "media";
declarative = true;
config = {
download_location = "/media/deluge";
max_upload_speed = 20;
# full-stream
enc_level = 1;
# forced
enc_in_policy = 0;
# forced
enc_out_policy = 0;
max_active_seeding = 100;
max_connections_global = 1000;
max_active_limit = 100;
max_active_downloading = 100;
listen_ports = listenPorts;
2022-03-15 15:58:04 +00:00
random_port = false;
enabled_plugins = [ "Label" "Extractor" ];
};
web.enable = true;
authFile = "/secrets/deluge/auth";
extraPackages = [ pkgs.unrar ];
};
2023-06-10 02:15:26 +01:00
};
2022-03-15 15:58:04 +00:00
2023-06-10 02:15:26 +01:00
architect.vhost.${domain} = with config.architect.networks; {
2023-10-21 14:00:58 +01:00
dnsInterfaces = [ "lan" "tailscale" ];
2023-06-10 02:15:26 +01:00
locations = {
"/" = {
allowLan = true;
port = 8112;
2022-10-28 14:03:09 +01:00
2023-06-10 02:15:26 +01:00
allow = [
tailscale.net
];
2022-03-15 15:58:04 +00:00
};
};
};
users.groups.media.members = [ "deluge" ];
}