Infini-DL360/torrenting: init

Not complete yet, needs a proper working vpn setup, but the base is
there
This commit is contained in:
Infinidoge 2025-01-24 21:38:22 -05:00
parent 67a33bf7fc
commit f767737de3
Signed by: Infinidoge
SSH key fingerprint: SHA256:EMoPe5e2dO0gEvtBb2xkZTz5dkyL0rBmuiGTKG5s96E
2 changed files with 51 additions and 0 deletions

View file

@ -21,6 +21,7 @@
./searx.nix ./searx.nix
./ssh.nix ./ssh.nix
./thelounge.nix ./thelounge.nix
./torrenting.nix
./vaultwarden.nix ./vaultwarden.nix
]; ];

View file

@ -0,0 +1,50 @@
{ pkgs, private, config, lib, ... }:
{
containers.torrenting = {
autoStart = true;
enableTun = true;
ephemeral = true;
privateNetwork = true;
hostAddress = "192.168.1.1";
localAddress = "192.169.1.2";
forwardPorts = [
{ hostPort = 9091; }
];
bindMounts = {
${config.secrets.ovpn} = { };
};
config = {
system.stateVersion = "25.05";
nixpkgs.pkgs = pkgs; # Reuse system nixpkgs
networking.useHostResolvConf = lib.mkForce false;
services.resolved.enable = true;
services.openvpn.servers.openvpn = {
config = ''
config ${private.files.ovpn}
auth-user-pass ${config.secrets.ovpn}
'';
};
systemd.services.transmission.serviceConfig = {
RootDirectoryStartOnly = lib.mkForce false;
RootDirectory = lib.mkForce "";
};
services.transmission = {
enable = true;
openRPCPort = true;
openPeerPorts = true;
settings = {
rpc-bind-address = "0.0.0.0";
rpc-whitelist-enabled = false;
};
};
};
};
}