Breaking changes announcement for unstable

This will be hitting the nixos-unstable channel soon: Enable systemd stage 1 by default by ElvishJerricco · Pull Request #435781 · NixOS/nixpkgs · GitHub

Stage 1 (a.k.a. initrd) is now based on systemd by default, and the old scripted implementation is deprecated and scheduled for removal in 26.11. If you run into issues migrating, you can get help from the community or report an issue on GitHub.

You can temporarily revert to the scripted stage 1 implementation by disabling boot.initrd.systemd.enable, but this is discouraged.

Most incompatibilities will be explained with assertions during configuration evaluation, but be aware of the following that can’t be automatically detected:

  • If you use LUKS disk encryption, ensure that fileSystems."/".device is set to "/dev/mapper/<name>", where <name> matches the name in your boot.initrd.luks.devices.<name> definition, to avoid systemd timing out while prompting for a passphrase. If you have a more complex setup, e.g. with LVM on top of LUKS, you may need to add "x-systemd.device-timeout=infinity" to fileSystems."/".options instead. If you need to disable the timeout before you can boot into the system, pass systemd.default_device_timeout_sec=infinity on the kernel command line.
  • The cryptsetup-askpass program is not available; use systemctl default instead, which will prompt for passphrases as necessary. If you pipe password responses into SSH over stdin, use ssh -o RequestTTY=force to ensure systemctl default gets a TTY to prompt on.
  • Many kernel parameters have been replaced with native systemd versions; see the “Boot Problems” section in the manual when it updates.

Many third-party modules and tools have already been adapted for systemd stage 1, but some like nixos-infect will still require adjustment to be compatible

28 Likes