Add test qbit setup
ci / test (push) Successful in 1m14s Details
ci / deploy (push) Successful in 2m58s Details

This commit is contained in:
Ciapa 2024-02-08 22:06:07 +01:00
parent 55f8c82eef
commit 5cbb5d2f33
1 changed files with 57 additions and 2 deletions

View File

@ -1,22 +1,77 @@
{ lib, ... }: { 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; autoStart = true;
privateNetwork = true; privateNetwork = true;
hostAddress = "10.175.197.82"; hostAddress = "10.175.197.82";
localAddress = "192.168.100.11"; localAddress = "192.168.100.11";
bindMounts = {
"/home" = {
hostPath = "/mnt/zbigdata/seedbox_test";
isReadOnly = false;
};
};
config = { config, pkgs, ... }: { config = { config, pkgs, ... }: {
system.stateVersion = "24.05"; system.stateVersion = "24.05";
networking = { networking = {
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 80 ];
}; };
useHostResolvConf = lib.mkForce false; useHostResolvConf = lib.mkForce false;
}; };
services.resolved.enable = true; services.resolved.enable = true;
# Custom stuff
environment.systemPackages = [ pkgs.qbittorrent-nox ];
networking.firewall = {
allowedTCPPorts = [ 51506 8888 ];
allowedUDPPorts = [ 51506 ];
};
systemd.services.qbittorrent = {
after = [ "network.target" ];
description = "qBittorrent Daemon";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.qbittorrent-nox ];
serviceConfig = {
ExecStart = ''
${pkgs.qbittorrent-nox}/bin/qbittorrent-nox \
--profile=/home/test/ \
--webui-port=8888
'';
Restart = "on-success";
User = "test";
Group = "test";
UMask = "0002";
LimitNOFILE = 8192;
};
};
users.groups.test = {};
users.users.test = {
group = "test";
isNormalUser = true;
home = "/home/test";
};
}; };
}; };
} }