nixos/graphite: fix test, use lib.getExe (#403732)

authored by Leona Maroni and committed by GitHub 67fbeddd 65a92bc7

+7 -7
+7 -7
nixos/modules/services/monitoring/graphite.nix
··· 292 serviceConfig = { 293 Slice = "system-graphite.slice"; 294 RuntimeDirectory = name; 295 - ExecStart = "${pkgs.python3Packages.twisted}/bin/twistd ${carbonOpts name}"; 296 User = "graphite"; 297 Group = "graphite"; 298 PermissionsStartOnly = true; ··· 319 serviceConfig = { 320 Slice = "system-graphite.slice"; 321 RuntimeDirectory = name; 322 - ExecStart = "${pkgs.python3Packages.twisted}/bin/twistd ${carbonOpts name}"; 323 User = "graphite"; 324 Group = "graphite"; 325 PIDFile = "/run/${name}/${name}.pid"; ··· 340 serviceConfig = { 341 Slice = "system-graphite.slice"; 342 RuntimeDirectory = name; 343 - ExecStart = "${pkgs.python3Packages.twisted}/bin/twistd ${carbonOpts name}"; 344 User = "graphite"; 345 Group = "graphite"; 346 PIDFile = "/run/${name}/${name}.pid"; ··· 384 }; 385 serviceConfig = { 386 ExecStart = '' 387 - ${pkgs.python3Packages.waitress-django}/bin/waitress-serve-django \ 388 --host=${cfg.web.listenAddress} --port=${toString cfg.web.port} 389 ''; 390 User = "graphite"; ··· 397 mkdir -p ${dataDir}/{whisper/,log/webapp/} 398 chmod 0700 ${dataDir}/{whisper/,log/webapp/} 399 400 - ${pkgs.python3Packages.django}/bin/django-admin.py migrate --noinput 401 402 chown -R graphite:graphite ${dataDir} 403 ··· 407 # Only collect static files when graphite_web changes. 408 if ! [ "${dataDir}/current_graphite_web" -ef "${pkgs.python3Packages.graphite-web}" ]; then 409 mkdir -p ${staticDir} 410 - ${pkgs.python3Packages.django}/bin/django-admin.py collectstatic --noinput --clear 411 chown -R graphite:graphite ${staticDir} 412 ln -sfT "${pkgs.python3Packages.graphite-web}" "${dataDir}/current_graphite_web" 413 fi ··· 427 ]; 428 environment = seyrenConfig; 429 serviceConfig = { 430 - ExecStart = "${pkgs.seyren}/bin/seyren -httpPort ${toString cfg.seyren.port}"; 431 WorkingDirectory = dataDir; 432 User = "graphite"; 433 Group = "graphite";
··· 292 serviceConfig = { 293 Slice = "system-graphite.slice"; 294 RuntimeDirectory = name; 295 + ExecStart = "${lib.getExe' pkgs.python3Packages.twisted "twistd"} ${carbonOpts name}"; 296 User = "graphite"; 297 Group = "graphite"; 298 PermissionsStartOnly = true; ··· 319 serviceConfig = { 320 Slice = "system-graphite.slice"; 321 RuntimeDirectory = name; 322 + ExecStart = "${lib.getExe' pkgs.python3Packages.twisted "twistd"} ${carbonOpts name}"; 323 User = "graphite"; 324 Group = "graphite"; 325 PIDFile = "/run/${name}/${name}.pid"; ··· 340 serviceConfig = { 341 Slice = "system-graphite.slice"; 342 RuntimeDirectory = name; 343 + ExecStart = "${lib.getExe' pkgs.python3Packages.twisted "twistd"} ${carbonOpts name}"; 344 User = "graphite"; 345 Group = "graphite"; 346 PIDFile = "/run/${name}/${name}.pid"; ··· 384 }; 385 serviceConfig = { 386 ExecStart = '' 387 + ${lib.getExe pkgs.python3Packages.waitress-django} \ 388 --host=${cfg.web.listenAddress} --port=${toString cfg.web.port} 389 ''; 390 User = "graphite"; ··· 397 mkdir -p ${dataDir}/{whisper/,log/webapp/} 398 chmod 0700 ${dataDir}/{whisper/,log/webapp/} 399 400 + ${lib.getExe' pkgs.python3Packages.django "django-admin"} migrate --noinput 401 402 chown -R graphite:graphite ${dataDir} 403 ··· 407 # Only collect static files when graphite_web changes. 408 if ! [ "${dataDir}/current_graphite_web" -ef "${pkgs.python3Packages.graphite-web}" ]; then 409 mkdir -p ${staticDir} 410 + ${lib.getExe' pkgs.python3Packages.django "django-admin"} collectstatic --noinput --clear 411 chown -R graphite:graphite ${staticDir} 412 ln -sfT "${pkgs.python3Packages.graphite-web}" "${dataDir}/current_graphite_web" 413 fi ··· 427 ]; 428 environment = seyrenConfig; 429 serviceConfig = { 430 + ExecStart = "${lib.getExe pkgs.seyren} -httpPort ${toString cfg.seyren.port}"; 431 WorkingDirectory = dataDir; 432 User = "graphite"; 433 Group = "graphite";