Prove
This commit is contained in:
parent
4300ddacb0
commit
b80563f0ed
10 changed files with 755 additions and 1 deletions
26
lxc-nix/services/networking.nix
Normal file
26
lxc-nix/services/networking.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
networking = {
|
||||
|
||||
# If you prefer DHCP
|
||||
# interfaces.eth0.useDHCP = true;
|
||||
|
||||
# We don't use DHCP, so we configure it statically.
|
||||
interfaces.eth0.ipv4.addresses = [{
|
||||
address = "10.42.135.101";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
|
||||
# We can access the internet through this interface.
|
||||
defaultGateway = {
|
||||
address = "10.42.135.1";
|
||||
interface = "eth0";
|
||||
};
|
||||
|
||||
# Since we don't use DHCP, we need to set our own nameservers.
|
||||
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
29
lxc-nix/services/qbittorrent.nix
Normal file
29
lxc-nix/services/qbittorrent.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# qBittorrent service activation
|
||||
#
|
||||
# The shell script 'fixdlperms' is also created and should be added to the
|
||||
# "Run external program on finished" section with the full path:
|
||||
# /run/current-system/sw/bin/fixdlperms
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
downloadDir = "/data/multimedia/downloads";
|
||||
fixDownloadPerms = pkgs.writeShellScriptBin "fixdlperms" ''
|
||||
find ${downloadDir} -type d -exec chmod 2775 {} +
|
||||
find ${downloadDir} -type f -exec chmod 0664 {} +
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.qbittorrent = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
dataDir = "/srv/qbittorrent";
|
||||
port = 58080;
|
||||
user = "qbittorrent";
|
||||
};
|
||||
|
||||
# Allow qbittorrent to save files in the multimedia share
|
||||
# users.users.qbittorrent.extraGroups = [ "multimedia" ];
|
||||
|
||||
environment.systemPackages = [ fixDownloadPerms ];
|
||||
}
|
||||
69
lxc-nix/services/rutorrent.nix
Normal file
69
lxc-nix/services/rutorrent.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
parameters = import ../parameters.nix { };
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
||||
rtorrent = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
downloadDir = parameters.downloadDir;
|
||||
};
|
||||
|
||||
rutorrent = {
|
||||
enable = true;
|
||||
hostName = parameters.containerName;
|
||||
plugins = [
|
||||
"_cloudflare"
|
||||
"_getdir"
|
||||
"_noty2"
|
||||
"_task"
|
||||
"autotools"
|
||||
"check_port"
|
||||
"chunks"
|
||||
"cookies"
|
||||
"cpuload"
|
||||
# "сreate"
|
||||
"data"
|
||||
"datadir"
|
||||
"diskspace"
|
||||
"edit"
|
||||
"erasedata"
|
||||
"extratio"
|
||||
"extsearch"
|
||||
"feeds"
|
||||
"filedrop"
|
||||
"geoip"
|
||||
"history"
|
||||
"httprpc"
|
||||
"ipad"
|
||||
"loginmgr"
|
||||
"lookat"
|
||||
"mediainfo"
|
||||
"ratio"
|
||||
"retrackers"
|
||||
"rss"
|
||||
"rssurlrewrite"
|
||||
"rutracker_check"
|
||||
"scheduler"
|
||||
"screenshots"
|
||||
"seedingtime"
|
||||
"show_peers_like_wtorrent"
|
||||
"source"
|
||||
"spectrogram"
|
||||
"theme"
|
||||
"throttle"
|
||||
"tracklabels"
|
||||
"trafic"
|
||||
"unpack"
|
||||
"uploadeta"
|
||||
];
|
||||
nginx = {
|
||||
enable = true;
|
||||
# exposeInsecureRPC2mount = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue