mirror of
https://github.com/FabricSoul/nixos-configs.git
synced 2025-08-03 16:50:24 -04:00
feat: add qbit
This commit is contained in:
parent
666eac0e37
commit
b368c62b3d
4 changed files with 68 additions and 9 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
# Define your exports
|
# Define your exports
|
||||||
exports = ''
|
exports = ''
|
||||||
/nas 192.168.2.101(rw,sync,no_root_squash,no_subtree_check) 100.0.0.0/8(rw,sync,no_root_squash,no_subtree_check)
|
/nas 100.0.0.0/8(rw,sync,no_root_squash,no_subtree_check)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Enable NFSv4 (recommended)
|
# Enable NFSv4 (recommended)
|
||||||
|
|
|
@ -1,11 +1,30 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
# Enable qBittorrent daemon
|
virtualisation.oci-containers = {
|
||||||
services.qbittorrent = {
|
backend = "docker"; # or "podman"
|
||||||
enable = true;
|
containers = {
|
||||||
dataDir = "/var/lib/qbittorrent";
|
qbittorrent = {
|
||||||
user = "qbittorrent";
|
image = "lscr.io/linuxserver/qbittorrent:latest";
|
||||||
group = "qbittorrent";
|
autoStart = true; # Equivalent to restart: unless-stopped
|
||||||
port = 8080; # WebUI port
|
|
||||||
openFirewall = true; # Opens the WebUI port in firewall
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Etc/UTC";
|
||||||
|
WEBUI_PORT = "8080";
|
||||||
|
TORRENTING_PORT = "6881";
|
||||||
|
};
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"/path/to/qbittorrent/appdata:/config"
|
||||||
|
"/nas/downloads:/downloads" # optional
|
||||||
|
];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
"8080:8080" # WebUI
|
||||||
|
"6881:6881" # Torrenting TCP
|
||||||
|
"6881:6881/udp" # Torrenting UDP
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
38
hosts/common/optional/samba.nix
Normal file
38
hosts/common/optional/samba.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# hosts/common/optional/nfs.nix
|
||||||
|
{...}: {
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
securityType = "user";
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
"workgroup" = "WORKGROUP";
|
||||||
|
"server string" = "smbnix";
|
||||||
|
"netbios name" = "smbnix";
|
||||||
|
"security" = "user";
|
||||||
|
#"use sendfile" = "yes";
|
||||||
|
#"max protocol" = "smb2";
|
||||||
|
# note: localhost is the ipv6 localhost ::1
|
||||||
|
"hosts allow" = "192.168.2. 127.0.0.1 100. localhost";
|
||||||
|
"hosts deny" = "0.0.0.0/0";
|
||||||
|
"guest account" = "nobody";
|
||||||
|
"map to guest" = "bad user";
|
||||||
|
};
|
||||||
|
"public" = {
|
||||||
|
"path" = "/nas";
|
||||||
|
"browseable" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes";
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
"force user" = "root";
|
||||||
|
"force group" = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,7 +14,9 @@
|
||||||
../common/optional/docker.nix
|
../common/optional/docker.nix
|
||||||
|
|
||||||
../common/optional/nfs.nix
|
../common/optional/nfs.nix
|
||||||
|
../common/optional/samba.nix
|
||||||
../common/optional/plex.nix
|
../common/optional/plex.nix
|
||||||
|
../common/optional/qbit.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue