mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge master into staging-next
This commit is contained in:
commit
11ee0bf5d7
32 changed files with 403 additions and 698 deletions
|
@ -167,6 +167,7 @@ exec {logOutFd}>&- {logErrFd}>&-
|
|||
|
||||
# Start systemd.
|
||||
echo "starting systemd..."
|
||||
|
||||
PATH=/run/current-system/systemd/lib/systemd:@fsPackagesPath@ \
|
||||
LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
|
||||
LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive @systemdUnitPathEnvVar@ \
|
||||
exec @systemdExecutable@
|
||||
|
|
|
@ -10,7 +10,7 @@ let
|
|||
src = ./stage-2-init.sh;
|
||||
shellDebug = "${pkgs.bashInteractive}/bin/bash";
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
inherit (config.boot) systemdExecutable;
|
||||
inherit (config.boot) systemdExecutable extraSystemdUnitPaths;
|
||||
isExecutable = true;
|
||||
inherit (config.nix) readOnlyStore;
|
||||
inherit useHostResolvConf;
|
||||
|
@ -20,6 +20,10 @@ let
|
|||
pkgs.util-linux
|
||||
] ++ lib.optional useHostResolvConf pkgs.openresolv);
|
||||
fsPackagesPath = lib.makeBinPath config.system.fsPackages;
|
||||
systemdUnitPathEnvVar = lib.optionalString (config.boot.extraSystemdUnitPaths != [])
|
||||
("SYSTEMD_UNIT_PATH="
|
||||
+ builtins.concatStringsSep ":" config.boot.extraSystemdUnitPaths
|
||||
+ ":"); # If SYSTEMD_UNIT_PATH ends with an empty component (":"), the usual unit load path will be appended to the contents of the variable
|
||||
postBootCommands = pkgs.writeText "local-cmds"
|
||||
''
|
||||
${config.boot.postBootCommands}
|
||||
|
@ -82,6 +86,15 @@ in
|
|||
PATH.
|
||||
'';
|
||||
};
|
||||
|
||||
extraSystemdUnitPaths = mkOption {
|
||||
default = [];
|
||||
type = types.listOf types.str;
|
||||
description = ''
|
||||
Additional paths that get appended to the SYSTEMD_UNIT_PATH environment variable
|
||||
that can contain mutable unit files.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue