Merge pull request #174090 from helsinki-systems/fix/plymouth

nixos/plymouth: Fix non-systemd initrd boot
main
Martin Weinelt 2 years ago committed by GitHub
commit 6d8f8a7b46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      nixos/modules/system/boot/plymouth.nix

@ -282,18 +282,18 @@ in
EOF EOF
''; '';
boot.initrd.extraUtilsCommandsTest = mkIf (!config.boot.initrd.enable) '' boot.initrd.extraUtilsCommandsTest = mkIf (!config.boot.initrd.systemd.enable) ''
$out/bin/plymouthd --help >/dev/null $out/bin/plymouthd --help >/dev/null
$out/bin/plymouth --help >/dev/null $out/bin/plymouth --help >/dev/null
''; '';
boot.initrd.extraUdevRulesCommands = mkIf (!config.boot.initrd.enable) '' boot.initrd.extraUdevRulesCommands = mkIf (!config.boot.initrd.systemd.enable) ''
cp ${config.systemd.package}/lib/udev/rules.d/{70-uaccess,71-seat}.rules $out cp ${config.systemd.package}/lib/udev/rules.d/{70-uaccess,71-seat}.rules $out
sed -i '/loginctl/d' $out/71-seat.rules sed -i '/loginctl/d' $out/71-seat.rules
''; '';
# We use `mkAfter` to ensure that LUKS password prompt would be shown earlier than the splash screen. # We use `mkAfter` to ensure that LUKS password prompt would be shown earlier than the splash screen.
boot.initrd.preLVMCommands = mkIf (!config.boot.initrd.enable) (mkAfter '' boot.initrd.preLVMCommands = mkIf (!config.boot.initrd.systemd.enable) (mkAfter ''
mkdir -p /etc/plymouth mkdir -p /etc/plymouth
mkdir -p /run/plymouth mkdir -p /run/plymouth
ln -s ${configFile} /etc/plymouth/plymouthd.conf ln -s ${configFile} /etc/plymouth/plymouthd.conf
@ -307,12 +307,12 @@ in
plymouth show-splash plymouth show-splash
''); '');
boot.initrd.postMountCommands = mkIf (!config.boot.initrd.enable) '' boot.initrd.postMountCommands = mkIf (!config.boot.initrd.systemd.enable) ''
plymouth update-root-fs --new-root-dir="$targetRoot" plymouth update-root-fs --new-root-dir="$targetRoot"
''; '';
# `mkBefore` to ensure that any custom prompts would be visible. # `mkBefore` to ensure that any custom prompts would be visible.
boot.initrd.preFailCommands = mkIf (!config.boot.initrd.enable) (mkBefore '' boot.initrd.preFailCommands = mkIf (!config.boot.initrd.systemd.enable) (mkBefore ''
plymouth quit --wait plymouth quit --wait
''); '');

Loading…
Cancel
Save