service/exportarr: fix apikey

This commit is contained in:
Felix Buehler 2023-07-25 22:20:49 +02:00
parent 724ca9dc1a
commit e4d8129873
7 changed files with 97 additions and 13 deletions

View file

@ -8,6 +8,13 @@ in
{
options.my.services.prowlarr = with lib; {
enable = mkEnableOption "Prowlarr for indexing";
apiKeyFile = lib.mkOption {
type = lib.types.path;
description = lib.mdDoc ''
File containing the api-key.
'';
};
};
config = lib.mkIf cfg.enable {
@ -39,8 +46,21 @@ in
my.services.exportarr.prowlarr = {
port = port + 1;
url = "http://127.0.0.1:${toString port}";
apiKeyFile = cfg.apiKeyFile;
};
services.prometheus.scrapeConfigs = [
{
job_name = "prowlarr";
static_configs = [{
targets = [ "127.0.0.1:${toString port + 1}" ];
labels = {
instance = config.networking.hostName;
};
}];
}
];
webapps.apps.prowlarr = {
dashboard = {
name = "Indexer";