File tree Expand file tree Collapse file tree 1 file changed +6
-24
lines changed Expand file tree Collapse file tree 1 file changed +6
-24
lines changed Original file line number Diff line number Diff line change @@ -356,36 +356,18 @@ let
356356 '' ;
357357 } ;
358358
359- exportarr-sonarr = let apikey = "eccff6a992bc2e4b88e46d064b26bb4e" ; in {
359+ exportarr-sonarr = let apiKeyFile = pkgs . writeText "dummy-api-key" "eccff6a992bc2e4b88e46d064b26bb4e" ; in {
360360 nodeName = "exportarr_sonarr" ;
361361 exporterConfig = {
362362 enable = true ;
363363 url = "http://127.0.0.1:8989" ;
364- apiKeyFile = pkgs . writeText "dummy-api-key" apikey ;
364+ inherit apiKeyFile ;
365365 } ;
366366 metricProvider = {
367- services . sonarr . enable = true ;
368- systemd . services . sonarr . serviceConfig . ExecStartPre =
369- let
370- sonarr_config = pkgs . writeText "config.xml" ''
371- <Config>
372- <LogLevel>info</LogLevel>
373- <EnableSsl>False</EnableSsl>
374- <Port>8989</Port>
375- <SslPort>9898</SslPort>
376- <UrlBase></UrlBase>
377- <BindAddress>*</BindAddress>
378- <ApiKey>${ apikey } </ApiKey>
379- <AuthenticationMethod>None</AuthenticationMethod>
380- <UpdateMechanism>BuiltIn</UpdateMechanism>
381- <Branch>main</Branch>
382- <InstanceName>Sonarr</InstanceName>
383- </Config>
384- '' ;
385- in
386- [
387- ''${ pkgs . coreutils } /bin/install -D -m 777 ${ sonarr_config } -T /var/lib/sonarr/.config/NzbDrone/config.xml''
388- ] ;
367+ services . sonarr = {
368+ enable = true ;
369+ inherit apiKeyFile ;
370+ } ;
389371 } ;
390372 exporterTest = ''
391373 wait_for_unit("sonarr.service")
You can’t perform that action at this time.
0 commit comments