Set up torrent
This commit is contained in:
parent
8c749b584d
commit
a3e919df3c
BIN
common/icons/qbittorrent.png
Normal file
BIN
common/icons/qbittorrent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 296 KiB |
|
@ -20,3 +20,4 @@ The idea is to always use consecutive ports, but never go back and try to recycl
|
||||||
| 8414 | [invidious](../hosts/nixos/lapetus/services/invidious.nix) |
|
| 8414 | [invidious](../hosts/nixos/lapetus/services/invidious.nix) |
|
||||||
| 8415 | [radicale](../hosts/nixos/lapetus/services/radicale.nix) |
|
| 8415 | [radicale](../hosts/nixos/lapetus/services/radicale.nix) |
|
||||||
| 8416 | [redlib](../hosts/nixos/lapetus/services/redlib.nix) |
|
| 8416 | [redlib](../hosts/nixos/lapetus/services/redlib.nix) |
|
||||||
|
| 8417 | [qbittorrent](../hosts/nixos/lapetus/services/qbittorrent.nix) |
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
./services/ddclient.nix
|
./services/ddclient.nix
|
||||||
./services/redlib.nix
|
./services/redlib.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
|
./services/qbittorrent.nix
|
||||||
./filesystems
|
./filesystems
|
||||||
./hardware
|
./hardware
|
||||||
];
|
];
|
||||||
|
|
|
@ -144,10 +144,16 @@ in
|
||||||
logo = icon "commafeed.png";
|
logo = icon "commafeed.png";
|
||||||
url = "https://rss.moonythm.dev";
|
url = "https://rss.moonythm.dev";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "Qbittorrent";
|
||||||
|
subtitle = "Torrent client";
|
||||||
|
logo = icon "jellyfin.png";
|
||||||
|
url = "https://qbit.moonythm.dev";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "Jellyfin";
|
name = "Jellyfin";
|
||||||
subtitle = "Media server";
|
subtitle = "Media server";
|
||||||
logo = icon "jellyfin.png";
|
logo = icon "qbittorrent.png";
|
||||||
url = "https://media.moonythm.dev";
|
url = "https://media.moonythm.dev";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
44
hosts/nixos/lapetus/services/qbittorrent.nix
Normal file
44
hosts/nixos/lapetus/services/qbittorrent.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
port = 8417;
|
||||||
|
dataDir = "/persist/data/home/adrielus/media";
|
||||||
|
configDir = "/persist/state/var/lib/qbittorrent";
|
||||||
|
vpnConfigDir = "/persist/state/var/lib/openvpn";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ../../common/optional/services/nginx.nix ];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."qbit.moonythm.dev" =
|
||||||
|
config.satellite.proxy port { };
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d ${dataDir}" "d ${configDir}" ];
|
||||||
|
virtualisation.oci-containers.qbittorrent = {
|
||||||
|
image = "linuxserver/qbittorrent:latest";
|
||||||
|
extraOptions = [ "--network=container:openvpn-client" ];
|
||||||
|
dependsOn = [ "openvpn-client" ];
|
||||||
|
volumes = [ "${dataDir}:/downloads" "${configDir}:/config" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
WEBUI_PORT = toString port;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# {{{ open-vpn
|
||||||
|
virtualisation.oci-containers.openvpn-client = {
|
||||||
|
image = "ghcr.io/wfg/openvpn-client";
|
||||||
|
extraOptions = [
|
||||||
|
"--network=bridge"
|
||||||
|
"--cap-add=net_admin"
|
||||||
|
"--devices=/dev/net/tun"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = [ "${vpnConfigDir}:/data/vpn" ];
|
||||||
|
ports = [ "${port}:${port}" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
KILL_SWITCH = "on"; # Turns off internet access if the VPN connection drops
|
||||||
|
FORWARDED_PORTS = "nl-ams-59103";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
|
}
|
Loading…
Reference in a new issue