1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 15:15:36 +00:00

Merge pull request #91092 from helsinki-systems/systemd-path-noapply

nixos/systemd: Don't use apply for $PATH
This commit is contained in:
Silvan Mosberger 2020-09-04 02:50:12 +02:00 committed by GitHub
commit 41c29f2540
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -777,6 +777,11 @@ CREATE ROLE postgres LOGIN SUPERUSER;
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/63103">PR #63103</link>.
</para>
</listitem>
<listitem>
<para>
<literal>config.systemd.services.${name}.path</literal> now returns a list of paths instead of a colon-separated string.
</para>
</listitem>
</itemizedlist>
</section>

View file

@ -234,7 +234,6 @@ in rec {
path = mkOption {
default = [];
type = with types; listOf (oneOf [ package str ]);
apply = ps: "${makeBinPath ps}:${makeSearchPathOutput "bin" "sbin" ps}";
description = ''
Packages added to the service's <envar>PATH</envar>
environment variable. Both the <filename>bin</filename>

View file

@ -257,7 +257,7 @@ let
pkgs.gnused
systemd
];
environment.PATH = config.path;
environment.PATH = "${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path}";
}
(mkIf (config.preStart != "")
{ serviceConfig.ExecStartPre =