diff options
author | Janne Heß <janne@hess.ooo> | 2020-06-19 11:45:27 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2020-09-03 20:27:55 +0200 |
commit | 8cf4ec8b97f4a76aa3243e344e64c8a29b8788cc (patch) | |
tree | a1fef2200975d9a42a7b5ff6ddea46b2c07f235a /nixos | |
parent | 94c2122d38aefec7aaf707757970e7a5a471b907 (diff) |
nixos/systemd: Don't use apply for $PATH
When not using apply, other modules can use $PATH as a list instead of getting a colon-separated list to each /bin directory.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2009.xml | 5 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd-unit-options.nix | 1 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index c936ae946adb6..0a76bffd5c98d 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -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> diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix index ac6fed440a266..5addc6f9ca44d 100644 --- a/nixos/modules/system/boot/systemd-unit-options.nix +++ b/nixos/modules/system/boot/systemd-unit-options.nix @@ -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> diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index f6c23c9b900e3..74d6957678f56 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -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 = |