55 ...
66} :
77with lib ; let
8+ inherit ( config ) nixflix ;
89 indexers = import ./indexers.nix {
910 inherit lib pkgs ;
1011 serviceName = "prowlarr" ;
@@ -17,19 +18,19 @@ with lib; let
1718 arrServices = [ "lidarr" "radarr" "sonarr" ] ;
1819
1920 mkDefaultApplication = serviceName : let
20- serviceConfig = config . nixflix . ${ serviceName } . config ;
21+ serviceConfig = nixflix . ${ serviceName } . config ;
2122 capitalizedName = lib . toUpper ( builtins . substring 0 1 serviceName ) + builtins . substring 1 ( - 1 ) serviceName ;
22- useNginx = config . nixflix . nginx . enable or false ;
23+ useNginx = nixflix . nginx . enable or false ;
2324 baseUrl =
2425 if useNginx
2526 then "http://127.0.0.1${ serviceConfig . hostConfig . urlBase } "
2627 else "http://127.0.0.1:${ toString serviceConfig . hostConfig . port } ${ serviceConfig . hostConfig . urlBase } " ;
2728 prowlarrUrl =
2829 if useNginx
29- then "http://127.0.0.1${ config . nixflix . prowlarr . config . hostConfig . urlBase } "
30- else "http://127.0.0.1:${ toString config . nixflix . prowlarr . config . hostConfig . port } ${ config . nixflix . prowlarr . config . hostConfig . urlBase } " ;
30+ then "http://127.0.0.1${ nixflix . prowlarr . config . hostConfig . urlBase } "
31+ else "http://127.0.0.1:${ toString nixflix . prowlarr . config . hostConfig . port } ${ nixflix . prowlarr . config . hostConfig . urlBase } " ;
3132 in
32- mkIf ( config . nixflix . ${ serviceName } . enable or false ) {
33+ mkIf ( nixflix . ${ serviceName } . enable or false ) {
3334 name = capitalizedName ;
3435 implementationName = capitalizedName ;
3536 apiKeyPath = mkDefault serviceConfig . apiKeyPath ;
5960 } ;
6061 } ;
6162
62- systemd . services . "prowlarr-indexers" = mkIf ( config . nixflix . enable && config . nixflix . prowlarr . enable && config . nixflix . prowlarr . config . apiKeyPath != null ) (
63- indexers . mkService config . nixflix . prowlarr . config
63+ systemd . services . "prowlarr-indexers" = mkIf ( nixflix . enable && nixflix . prowlarr . enable && nixflix . prowlarr . config . apiKeyPath != null ) (
64+ indexers . mkService nixflix . prowlarr . config
6465 ) ;
6566
66- systemd . services . "prowlarr-applications" = mkIf ( config . nixflix . enable && config . nixflix . prowlarr . enable && config . nixflix . prowlarr . config . apiKeyPath != null ) (
67- applications . mkService config . nixflix . prowlarr . config
67+ systemd . services . "prowlarr-applications" = mkIf ( nixflix . enable && nixflix . prowlarr . enable && nixflix . prowlarr . config . apiKeyPath != null ) (
68+ applications . mkService nixflix . prowlarr . config
6869 ) ;
6970 } ;
7071}
0 commit comments