Compare commits

..

11 commits

Author SHA1 Message Date
dc9b8b5492 flake: bump inputs
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-03-31 22:49:11 +02:00
e6bda50a74 nixos: services: servarr: nzbhydra: fix websockets
From what I could read, NZBHydra2 *might* require proxying websockets in
new versions (better safe than sorry).
2025-03-31 21:43:05 +02:00
abd346d329 nixos: services: servarr: migrate nzbhydra 2025-03-31 21:43:05 +02:00
1c968bb4fe nixos: services: servarr: jackett: add 'port' 2025-03-31 21:43:05 +02:00
20aa72611a nixos: services: servarr: migrate jackett 2025-03-31 21:43:05 +02:00
8c4a41ffea nixos: services: servarr: migrate prowlarr
The configuration doesn't have `group`, so it's a slightly different
configuration to the rest of the *arr services.

I also want to move the other two indexer modules under `servarr`, as
they are all closely related.
2025-03-31 21:43:05 +02:00
f783e4c789 nixos: services: servarr: starr: add 'port'
Now that declarative configurations are supported for those
applications.
2025-03-31 21:36:44 +02:00
96129a8b2f nixox: services: servarr: refactor starr config
Makes it slightly DRY-er and more readable.
2025-03-31 21:36:44 +02:00
9884faee12 nixos: services: servarr: bazarr: add 'port' 2025-03-31 21:36:44 +02:00
137390abf6 nixos: services: servarr: extract bazarr
It's not an actual *arr package, but closely related to them. Extract
its configuration to a sub-module.
2025-03-31 21:36:44 +02:00
a636c3258a nixos: services: servarr: fix 'enableAll' logic
I renamed the option and refactored how it worked to make it more
explicit that it enables the entire suite by default, with explicit
opt-out of individual components (or fine-grained opt-in as an
alternative).
2025-03-31 21:23:10 +02:00
7 changed files with 63 additions and 11 deletions

12
flake.lock generated
View file

@ -136,11 +136,11 @@
]
},
"locked": {
"lastModified": 1742771635,
"narHash": "sha256-HQHzQPrg+g22tb3/K/4tgJjPzM+/5jbaujCZd8s2Mls=",
"lastModified": 1743438213,
"narHash": "sha256-ZZDN+0v1r4I1xkQWlt8euOJv5S4EvElUCZMrDjTCEsY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ad0614a1ec9cce3b13169e20ceb7e55dfaf2a818",
"rev": "ccd7df836e1f42ea84806760f25b77b586370259",
"type": "github"
},
"original": {
@ -152,11 +152,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1742669843,
"narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=",
"lastModified": 1743315132,
"narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1e5b653dff12029333a6546c11e108ede13052eb",
"rev": "52faf482a3889b7619003c0daec593a1912fddc1",
"type": "github"
},
"original": {

View file

@ -3,7 +3,7 @@ let
cfg = config.my.services.servarr.bazarr;
in
{
options.my.services.servarr = with lib; {
options.my.services.servarr.bazarr = with lib; {
enable = lib.mkEnableOption "Bazarr" // {
default = config.my.services.servarr.enableAll;
};

View file

@ -8,8 +8,8 @@
./bazarr.nix
./jackett.nix
./nzbhydra.nix
./prowlarr.nix
(import ./starr.nix "lidarr")
(import ./starr.nix "prowlarr")
(import ./starr.nix "radarr")
(import ./starr.nix "readarr")
(import ./starr.nix "sonarr")

View file

@ -3,7 +3,7 @@ let
cfg = config.my.services.servarr.jackett;
in
{
options.my.services.servarr = with lib; {
options.my.services.servarr.jackett = with lib; {
enable = lib.mkEnableOption "Jackett" // {
default = config.my.services.servarr.enableAll;
};

View file

@ -3,7 +3,7 @@ let
cfg = config.my.services.servarr.nzbhydra;
in
{
options.my.services.servarr = with lib; {
options.my.services.servarr.nzbhydra = with lib; {
enable = lib.mkEnableOption "NZBHydra2" // {
default = config.my.services.servarr.enableAll;
};

View file

@ -0,0 +1,53 @@
# Torrent and NZB indexer
{ config, lib, ... }:
let
cfg = config.my.services.servarr.prowlarr;
in
{
options.my.services.servarr.prowlarr = with lib; {
enable = lib.mkEnableOption "Prowlarr" // {
default = config.my.services.servarr.enableAll;
};
port = mkOption {
type = types.port;
default = 9696;
example = 8080;
description = "Internal port for webui";
};
};
config = lib.mkIf cfg.enable {
services.prowlarr = {
enable = true;
settings = {
server = {
port = cfg.port;
};
};
};
my.services.nginx.virtualHosts = {
prowlarr = {
inherit (cfg) port;
};
};
services.fail2ban.jails = {
prowlarr = ''
enabled = true
filter = prowlarr
action = iptables-allports
'';
};
environment.etc = {
"fail2ban/filter.d/prowlarr.conf".text = ''
[Definition]
failregex = ^.*\|Warn\|Auth\|Auth-Failure ip <HOST> username .*$
journalmatch = _SYSTEMD_UNIT=prowlarr.service
'';
};
};
}

View file

@ -5,7 +5,6 @@ let
cfg = config.my.services.servarr.${starr};
ports = {
lidarr = 8686;
prowlarr = 9696;
radarr = 7878;
readarr = 8787;
sonarr = 8989;