{ name = "Sonarr"; description = '' Sonarr PVR ''; traefikRoutes = { hostname, config, ... }: [ { name = "${hostname}-sonarr"; rule = "Host(`${config.sonarr.domain}`)"; target = "http://${hostname}.lan:8989"; } ]; nixosModule = { 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 = { }; }; }; }