Files
nixos/modules/environments/sonarr/default.nix
T
marthsincemelee 191e860455 feat: Homepage
2026-04-20 14:46:44 +02:00

41 lines
719 B
Nix

# 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" ];
};
};
}