git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/systemd: allow preStart with other ExecStartPre cmdlines

Declaring them as lists enables the concatenation, supporting lib.mkBefore, lib.mkOrder, etc. This is useful when you need to extend a service with a pre-start script that needs to run as root.

commit3936d85ec3015bd91e9d605b26767b3c47964851 authorRobert Hensing <robert@roberthensing.nl> dateTue 19 Jan 2021, 16:29 (6 years ago) parenta141de9
1 file changed+2−2
nixos/modules/system/boot/systemd.nix+2−2
nixos/modules/system/boot/systemd.nix+2−2
@@ -263,7 +263,7 @@ let
263263 }
264264 (mkIf (config.preStart != "")
265265 { serviceConfig.ExecStartPre =
266− makeJobScript "${name}-pre-start" config.preStart;
266+ [ (makeJobScript "${name}-pre-start" config.preStart) ];
267267 })
268268 (mkIf (config.script != "")
269269 { serviceConfig.ExecStart =
@@ -271,7 +271,7 @@ let
271271 })
272272 (mkIf (config.postStart != "")
273273 { serviceConfig.ExecStartPost =
274− makeJobScript "${name}-post-start" config.postStart;
274+ [ (makeJobScript "${name}-post-start" config.postStart) ];
275275 })
276276 (mkIf (config.reload != "")
277277 { serviceConfig.ExecReload =