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