# manages and downloads films { config, lib, pkgs, ... }: let cfg = config.my.profiles.sonarr; hostName = config.networking.hostName; port = 8989; in { options.my.profiles.sonarr = with lib; { enable = mkEnableOption "sonarr for series management"; }; config = lib.mkIf cfg.enable { services.sonarr = { enable = true; openFirewall = true; }; my.homepage.services = [ { group = "Media"; name = "Sonarr"; description = "Series management"; href = "http://${hostName}:${toString port}"; } ]; my.profiles.prowlarr.enable = true; systemd.services.sonarr = { after = [ "network-online.target" ]; }; }; }