{ ... }:
{
  # The sonarr package is dependend on .NET 6 which is marked as insecure.
  # It doesn't seem to build with the later .NET versions.
  # In the meantime allow the installation of these insecure packages since sonarr is only reachable locally.
  nixpkgs.config = {
    permittedInsecurePackages = [
      "aspnetcore-runtime-wrapped-6.0.36"
      "aspnetcore-runtime-6.0.36"
      "dotnet-sdk-wrapped-6.0.428"
      "dotnet-sdk-6.0.428"
    ];
  };

  services.sonarr = {
    enable = true;
    user = "torrent";
    group = "torrent";
  };
}