File tree Expand file tree Collapse file tree 1 file changed +4
-22
lines changed Expand file tree Collapse file tree 1 file changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -364,28 +364,10 @@ let
364364 apiKeyFile = pkgs . writeText "dummy-api-key" apikey ;
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+ environmentFiles = [ ( pkgs . writeText "sonarr-env" "SONARR__AUTH__APIKEY=${ apikey } " ) ] ;
370+ } ;
389371 } ;
390372 exporterTest = ''
391373 wait_for_unit("sonarr.service")
You can’t perform that action at this time.
0 commit comments