2024-12-26 17:22:00 +01:00
|
|
|
{
|
|
|
|
name = "Sonarr";
|
|
|
|
description = ''
|
|
|
|
Sonarr PVR
|
|
|
|
'';
|
|
|
|
|
|
|
|
traefikRoutes =
|
|
|
|
{
|
|
|
|
hostname,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
[
|
|
|
|
{
|
|
|
|
name = "${hostname}-sonarr";
|
|
|
|
rule = "Host(`${config.sonarr.domain}`)";
|
|
|
|
target = "http://${hostname}.lan:8989";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2024-12-26 17:38:25 +01:00
|
|
|
nixosModule =
|
2024-12-26 17:22:00 +01:00
|
|
|
{ lib, ... }:
|
|
|
|
{
|
|
|
|
options.sonarr = {
|
|
|
|
domain = lib.mkOption {
|
|
|
|
type = lib.types.listOf lib.types.str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
# Enable the sonarr service
|
|
|
|
services.sonarr = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
group = "media";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Ensure that the media group exists
|
|
|
|
users.groups.media = { };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|