nixos: services: servarr: migrate jackett
This commit is contained in:
parent
f825d047b5
commit
950cf4dd05
4 changed files with 38 additions and 22 deletions
|
|
@ -145,6 +145,10 @@ in
|
|||
lidarr = {
|
||||
enable = false;
|
||||
};
|
||||
# I only use Prowlarr nowadays
|
||||
jackett = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
# Because I still need to play sysadmin
|
||||
ssh-server.enable = true;
|
||||
|
|
|
|||
|
|
@ -3,36 +3,14 @@
|
|||
let
|
||||
cfg = config.my.services.indexers;
|
||||
|
||||
jackettPort = 9117;
|
||||
nzbhydraPort = 5076;
|
||||
in
|
||||
{
|
||||
options.my.services.indexers = with lib; {
|
||||
jackett.enable = mkEnableOption "Jackett torrent meta-indexer";
|
||||
nzbhydra.enable = mkEnableOption "NZBHydra2 usenet meta-indexer";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.jackett.enable {
|
||||
services.jackett = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Jackett wants to eat *all* my RAM if left to its own devices
|
||||
systemd.services.jackett = {
|
||||
serviceConfig = {
|
||||
MemoryHigh = "15%";
|
||||
MemoryMax = "25%";
|
||||
};
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = {
|
||||
jackett = {
|
||||
port = jackettPort;
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.nzbhydra.enable {
|
||||
services.nzbhydra2 = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
{
|
||||
imports = [
|
||||
./bazarr.nix
|
||||
./jackett.nix
|
||||
./prowlarr.nix
|
||||
(import ./starr.nix "lidarr")
|
||||
(import ./starr.nix "radarr")
|
||||
|
|
|
|||
33
modules/nixos/services/servarr/jackett.nix
Normal file
33
modules/nixos/services/servarr/jackett.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.servarr.jackett;
|
||||
in
|
||||
{
|
||||
options.my.services.servarr.jackett = with lib; {
|
||||
enable = lib.mkEnableOption "Jackett" // {
|
||||
default = config.my.services.servarr.enableAll;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.jackett = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Jackett wants to eat *all* my RAM if left to its own devices
|
||||
systemd.services.jackett = {
|
||||
serviceConfig = {
|
||||
MemoryHigh = "15%";
|
||||
MemoryMax = "25%";
|
||||
};
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = {
|
||||
jackett = {
|
||||
port = 9117;
|
||||
};
|
||||
};
|
||||
|
||||
# Jackett does not log authentication failures...
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue