containers: add qbittorent
This commit is contained in:
parent
f5705ae08d
commit
89947435e1
3 changed files with 51 additions and 3 deletions
13
containers/default.nix
Normal file
13
containers/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"./jellyfin.nix"
|
||||||
|
"./qbittorent.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
settings.containers = {
|
||||||
|
jellyfin.enable = lib.mkDefault false;
|
||||||
|
qbittorent.enable = lib.mkDefault false;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
36
containers/qbittorrent.nix
Normal file
36
containers/qbittorrent.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options.settings.containers.qbittorent = {
|
||||||
|
enable = lib.mkEnableOption "enable qbittorent arion container";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.settings.containers.qbittorent.enable {
|
||||||
|
virtualisation.arion.projects.qbittorent = {
|
||||||
|
settings = {
|
||||||
|
project.name = "qbittorent";
|
||||||
|
services.qbittorent = {
|
||||||
|
service.useHostStore = true;
|
||||||
|
service.image = "linuxserver/qbittorrent:latest";
|
||||||
|
service.ports = [
|
||||||
|
"8080:8080"
|
||||||
|
"6881:6881"
|
||||||
|
"6881:6881/udp"
|
||||||
|
];
|
||||||
|
service.volumes = [
|
||||||
|
"/config/qbittorent:/config"
|
||||||
|
"/data/torrents:/torrents"
|
||||||
|
];
|
||||||
|
service.environment = {
|
||||||
|
WEBUI_PORT = 8080;
|
||||||
|
TORRENTING_PORT = 6881;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -7,10 +7,9 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
../../containers/jellyfin.nix
|
../../containers
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -29,7 +28,7 @@
|
||||||
openssh.usePAM = lib.mkForce true;
|
openssh.usePAM = lib.mkForce true;
|
||||||
};
|
};
|
||||||
|
|
||||||
containers.jellyfin.enable = true;
|
containers.jellyfin.enable = lib.mkForce true;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue