44 lines
804 B
Nix
44 lines
804 B
Nix
# manages and downloads films
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.profiles.readarr;
|
|
hostName = config.networking.hostName;
|
|
port = 8787;
|
|
in
|
|
# domain = config.networking.domain;
|
|
# port = 7878;
|
|
{
|
|
options.my.profiles.readarr = with lib; {
|
|
enable = mkEnableOption "Readarr for ebook management";
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.readarr = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
my.homepage.services = [
|
|
{
|
|
group = "Media";
|
|
name = "Readarr";
|
|
description = "Book management";
|
|
href = "http://${hostName}:${toString port}";
|
|
icon = "readarr.png";
|
|
}
|
|
];
|
|
|
|
my.profiles.prowlarr.enable = true;
|
|
|
|
systemd.services.readarr = {
|
|
after = [ "network-online.target" ];
|
|
};
|
|
};
|
|
}
|