From 0d2f01214157fb79a831ccda5f51faf9d23507fd Mon Sep 17 00:00:00 2001 From: Ciapa Date: Thu, 8 Feb 2024 22:06:07 +0100 Subject: [PATCH] Add test qbit setup --- hosts/phoenix.lewd.wtf/containers/test.nix | 45 +++++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/hosts/phoenix.lewd.wtf/containers/test.nix b/hosts/phoenix.lewd.wtf/containers/test.nix index da3ca3c..0261abb 100644 --- a/hosts/phoenix.lewd.wtf/containers/test.nix +++ b/hosts/phoenix.lewd.wtf/containers/test.nix @@ -1,22 +1,63 @@ { lib, ... }: { - containers.test = { + networking.nat.forwardPorts = [ + { + destination = "192.168.100.11:51506"; + proto = "tcp"; + sourcePort = 51506; + } + { + destination = "192.168.100.11:51506"; + proto = "udp"; + sourcePort = 51506; + } + ]; + + containers.seedbox_test = { autoStart = true; privateNetwork = true; hostAddress = "10.175.197.82"; localAddress = "192.168.100.11"; + + bindMounts = { + "/home" = { + hostPath = "/mnt/zbigdata/seedbox_test"; + isReadOnly = false; + }; + }; + config = { config, pkgs, ... }: { + imports = + [ + ../../../deployments/seedbox/qbittorrent/default.nix + ]; system.stateVersion = "24.05"; networking = { firewall = { enable = true; - allowedTCPPorts = [ 80 ]; }; useHostResolvConf = lib.mkForce false; }; services.resolved.enable = true; + + # Custom stuff + variables.qbittorrent = { + user = "test"; + group = "test"; + torrentPort = 51506; + uiPort = 8888; + configDir = "/home/test/"; + openFilesLimit = 8192; + }; + + users.groups.test = {}; + users.users.test = { + group = "test"; + isNormalUser = true; + home = "/home/test"; + }; }; }; }