nixos/graphite: fix test, use lib.getExe (#403732)
This commit is contained in:
@@ -292,7 +292,7 @@ in
|
||||
serviceConfig = {
|
||||
Slice = "system-graphite.slice";
|
||||
RuntimeDirectory = name;
|
||||
ExecStart = "${pkgs.python3Packages.twisted}/bin/twistd ${carbonOpts name}";
|
||||
ExecStart = "${lib.getExe' pkgs.python3Packages.twisted "twistd"} ${carbonOpts name}";
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PermissionsStartOnly = true;
|
||||
@@ -319,7 +319,7 @@ in
|
||||
serviceConfig = {
|
||||
Slice = "system-graphite.slice";
|
||||
RuntimeDirectory = name;
|
||||
ExecStart = "${pkgs.python3Packages.twisted}/bin/twistd ${carbonOpts name}";
|
||||
ExecStart = "${lib.getExe' pkgs.python3Packages.twisted "twistd"} ${carbonOpts name}";
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PIDFile = "/run/${name}/${name}.pid";
|
||||
@@ -340,7 +340,7 @@ in
|
||||
serviceConfig = {
|
||||
Slice = "system-graphite.slice";
|
||||
RuntimeDirectory = name;
|
||||
ExecStart = "${pkgs.python3Packages.twisted}/bin/twistd ${carbonOpts name}";
|
||||
ExecStart = "${lib.getExe' pkgs.python3Packages.twisted "twistd"} ${carbonOpts name}";
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
PIDFile = "/run/${name}/${name}.pid";
|
||||
@@ -384,7 +384,7 @@ in
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.python3Packages.waitress-django}/bin/waitress-serve-django \
|
||||
${lib.getExe pkgs.python3Packages.waitress-django} \
|
||||
--host=${cfg.web.listenAddress} --port=${toString cfg.web.port}
|
||||
'';
|
||||
User = "graphite";
|
||||
@@ -397,7 +397,7 @@ in
|
||||
mkdir -p ${dataDir}/{whisper/,log/webapp/}
|
||||
chmod 0700 ${dataDir}/{whisper/,log/webapp/}
|
||||
|
||||
${pkgs.python3Packages.django}/bin/django-admin.py migrate --noinput
|
||||
${lib.getExe' pkgs.python3Packages.django "django-admin"} migrate --noinput
|
||||
|
||||
chown -R graphite:graphite ${dataDir}
|
||||
|
||||
@@ -407,7 +407,7 @@ in
|
||||
# Only collect static files when graphite_web changes.
|
||||
if ! [ "${dataDir}/current_graphite_web" -ef "${pkgs.python3Packages.graphite-web}" ]; then
|
||||
mkdir -p ${staticDir}
|
||||
${pkgs.python3Packages.django}/bin/django-admin.py collectstatic --noinput --clear
|
||||
${lib.getExe' pkgs.python3Packages.django "django-admin"} collectstatic --noinput --clear
|
||||
chown -R graphite:graphite ${staticDir}
|
||||
ln -sfT "${pkgs.python3Packages.graphite-web}" "${dataDir}/current_graphite_web"
|
||||
fi
|
||||
@@ -427,7 +427,7 @@ in
|
||||
];
|
||||
environment = seyrenConfig;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.seyren}/bin/seyren -httpPort ${toString cfg.seyren.port}";
|
||||
ExecStart = "${lib.getExe pkgs.seyren} -httpPort ${toString cfg.seyren.port}";
|
||||
WorkingDirectory = dataDir;
|
||||
User = "graphite";
|
||||
Group = "graphite";
|
||||
|
||||
Reference in New Issue
Block a user