Merge pull request #299717 from ElvishJerricco/systemd-debug-shell

nixos/systemd: Enable debug-shell.service.
This commit is contained in:
Florian Klink 2024-04-01 17:20:24 +02:00 committed by GitHub
commit fd61db7a32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -47,6 +47,9 @@ let
"rescue.target"
"rescue.service"
# systemd-debug-generator
"debug-shell.service"
# Udev.
"systemd-tmpfiles-setup-dev-early.service"
"systemd-udevd-control.socket"

View File

@ -18,10 +18,10 @@ let
cfg = config.boot.initrd.systemd;
# Copied from fedora
upstreamUnits = [
"basic.target"
"ctrl-alt-del.target"
"debug-shell.service"
"emergency.service"
"emergency.target"
"final.target"
@ -398,7 +398,8 @@ in {
++ lib.optional (config.boot.initrd.systemd.root == "gpt-auto") "rw";
boot.initrd.systemd = {
initrdBin = [pkgs.bash pkgs.coreutils cfg.package.kmod cfg.package];
# bashInteractive is easier to use and also required by debug-shell.service
initrdBin = [pkgs.bashInteractive pkgs.coreutils cfg.package.kmod cfg.package];
extraBin = {
less = "${pkgs.less}/bin/less";
mount = "${cfg.package.util-linux}/bin/mount";
@ -472,6 +473,9 @@ in {
"${cfg.package.util-linux}/bin/umount"
"${cfg.package.util-linux}/bin/sulogin"
# required for script services
"${pkgs.runtimeShell}"
# so NSS can look up usernames
"${pkgs.glibc}/lib/libnss_files.so.2"
] ++ optionals (cfg.package.withCryptsetup && cfg.enableTpm2) [