mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport staging-nixos-26.05] nixos/systemd-initrd: add systemd.*.services.path to initrd store (#533498)
This commit is contained in:
commit
128930c926
1 changed files with 11 additions and 0 deletions
|
|
@ -124,6 +124,16 @@ let
|
|||
jobScripts = concatLists (
|
||||
mapAttrsToList (_: unit: unit.jobScripts or [ ]) (filterAttrs (_: v: v.enable) cfg.services)
|
||||
);
|
||||
unitEnv = pkgs.buildEnv {
|
||||
name = "initrd-unit-env";
|
||||
paths = concatLists (
|
||||
mapAttrsToList (_: unit: unit.path or [ ]) (filterAttrs (_: v: v.enable) cfg.services)
|
||||
);
|
||||
pathsToLink = [
|
||||
"/bin"
|
||||
"/sbin"
|
||||
];
|
||||
};
|
||||
|
||||
stage1Units = generateUnits {
|
||||
type = "initrd";
|
||||
|
|
@ -636,6 +646,7 @@ in
|
|||
"${pkgs.bashNonInteractive}/bin"
|
||||
]
|
||||
++ jobScripts
|
||||
++ [ unitEnv ]
|
||||
++ map (c: removeAttrs c [ "text" ]) (builtins.attrValues cfg.contents)
|
||||
++ lib.optional (pkgs.stdenv.hostPlatform.libc == "glibc") "${pkgs.glibc}/lib/libnss_files.so.2";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue