mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
nixos/systemd: allow disabling the path default for services (#482045)
This commit is contained in:
commit
999004c3c9
2 changed files with 21 additions and 11 deletions
|
|
@ -688,17 +688,19 @@ rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
stage2ServiceConfig = {
|
stage2ServiceConfig =
|
||||||
imports = [ serviceConfig ];
|
{ config, ... }:
|
||||||
# Default path for systemd services. Should be quite minimal.
|
{
|
||||||
config.path = mkAfter [
|
imports = [ serviceConfig ];
|
||||||
pkgs.coreutils
|
# Default path for systemd services. Should be quite minimal.
|
||||||
pkgs.findutils
|
config.path = mkIf config.enableDefaultPath (mkAfter [
|
||||||
pkgs.gnugrep
|
pkgs.coreutils
|
||||||
pkgs.gnused
|
pkgs.findutils
|
||||||
systemd
|
pkgs.gnugrep
|
||||||
];
|
pkgs.gnused
|
||||||
};
|
systemd
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
||||||
stage1ServiceConfig = serviceConfig;
|
stage1ServiceConfig = serviceConfig;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -379,6 +379,14 @@ rec {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableDefaultPath = mkOption {
|
||||||
|
default = true;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether to append a minimal default {env}`PATH` environment variable to the service, containing common system utilities.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
serviceConfig = mkOption {
|
serviceConfig = mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
example = {
|
example = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue