Merge pull request #91092 from helsinki-systems/systemd-path-noapply
nixos/systemd: Don't use apply for $PATH
This commit is contained in:
commit
41c29f2540
|
@ -777,6 +777,11 @@ CREATE ROLE postgres LOGIN SUPERUSER;
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/63103">PR #63103</link>.
|
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/63103">PR #63103</link>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</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>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -234,7 +234,6 @@ in rec {
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = with types; listOf (oneOf [ package str ]);
|
type = with types; listOf (oneOf [ package str ]);
|
||||||
apply = ps: "${makeBinPath ps}:${makeSearchPathOutput "bin" "sbin" ps}";
|
|
||||||
description = ''
|
description = ''
|
||||||
Packages added to the service's <envar>PATH</envar>
|
Packages added to the service's <envar>PATH</envar>
|
||||||
environment variable. Both the <filename>bin</filename>
|
environment variable. Both the <filename>bin</filename>
|
||||||
|
|
|
@ -257,7 +257,7 @@ let
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
systemd
|
systemd
|
||||||
];
|
];
|
||||||
environment.PATH = config.path;
|
environment.PATH = "${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path}";
|
||||||
}
|
}
|
||||||
(mkIf (config.preStart != "")
|
(mkIf (config.preStart != "")
|
||||||
{ serviceConfig.ExecStartPre =
|
{ serviceConfig.ExecStartPre =
|
||||||
|
|
Loading…
Reference in New Issue