Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions modules/initrd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,24 @@ in
];

systemd.contents."/etc/profile" = lib.mkIf (cfg.luks.devices != { }) {
text = ''
echo "If the boot process does not continue in 5 seconds, try running:"
echo " systemctl start default.target"
''
+ lib.concatMapAttrsStringSep "\n"
(volume: disk: "systemd-cryptsetup attach ${volume} ${disk.device}")
cfg.luks.devices;
text = let
help = ''
echo
echo
echo "If the boot process does not continue in 5 seconds, try running:"
echo " systemctl default"
echo
echo "If that does not continue the boot, see if any units failed and try restarting them:"
echo " systemctl --failed"
echo
echo
'';
in
help
+ lib.concatMapAttrsStringSep "\n"
(volume: disk: "systemd-cryptsetup attach ${volume} ${disk.device}")
cfg.luks.devices
+ help;
};
};

Expand Down