nixpkgs/nixos/modules/system/boot
Matthias Treydte a30de3b849 nixos/systemd-boot: fix systemd-boot-builder dowgrade to fail
Since, 4ddc78818e systemd-boot-builder
is broken in two ways:

  * if no systemd-boot is currently installed *and* the NIXOS_INSTALL_BOOTLOADER
    env variable is not set, it will try to run "bootctl update", which will fail
  * if the currently installed systemd-boot version is newer than the version
    we're about to install, it will also try to run "bootctl update", which will fail

This patch changes the behaviour,

  * for the first case to still fail, but not even bother to try running
    "bootctl update" and instead erroring out with an exception
  * for the second case to leave the newer version in place, restoring
    the pre - 4ddc78818e behaviour

To do the proper version check a new "should_update" helper function was introduced,
mimicing the compare_product C function from bootctl. If the following systemd
issue gets resolved, we would have a nice way to get rid of this function:

> https://github.com/systemd/systemd/issues/23450

This change allows to again switch to a different NixOS configuration which contains
an older systemd-boot.

Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
2022-05-28 13:18:21 +02:00
..
loader nixos/systemd-boot: fix systemd-boot-builder dowgrade to fail 2022-05-28 13:18:21 +02:00
systemd nixos/systemd: Package only built component units 2022-05-16 16:52:25 +02:00
binfmt.nix nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
emergency-mode.nix nixos/*: editorconfig fixes 2020-08-08 10:54:16 +10:00
grow-partition.nix utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
initrd-network.nix nixos/initrd-network: fix /etc/resolv.conf when multiple dns servers from DHCP 2020-10-19 21:32:58 -07:00
initrd-openvpn.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
initrd-ssh.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
kernel.nix nixos: don't put non-firmware in hardware.firmware 2022-05-12 15:17:51 +00:00
kernel_config.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
kexec.nix kexec-tools: rename from kexectools to match the project name 2021-09-03 10:17:21 -04:00
luksroot.nix nixos/systemd-stage-1: Remove unnecessary binaries 2022-04-30 14:50:02 +02:00
modprobe.nix treewide: pkgs.systemd -> config.systemd.package 2022-05-05 20:00:31 +02:00
networkd.nix nixos/networkd: allow RouteMetric for IPv6AcceptRA 2022-04-30 00:30:04 +02:00
pbkdf2-sha512.c nixos/boot: add final newline to pbkdf2-sha512.c 2020-11-09 11:39:28 +00:00
plymouth.nix nixos/plymouth: Fix non-systemd initrd boot 2022-05-23 11:17:21 +02:00
resolved.nix nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
shutdown.nix utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
stage-1-init.sh nixos/stage-1: remove dead code 2022-05-03 16:15:51 +02:00
stage-1.nix Merge pull request #165892 from tpwrules/fix-initrd-dirlinks 2022-04-21 20:51:35 +03:00
stage-2-init.sh nixos/stage-1-systemd: Handover between the systemds directly 2022-04-11 20:04:33 +01:00
stage-2.nix Merge pull request #165453 from helsinki-systems/feat/systemd-manager-environment 2022-03-31 01:35:09 +02:00
systemd.nix nixos/systemd: Package only built component units 2022-05-16 16:52:25 +02:00
timesyncd.nix nixos/timesyncd: initialize clock file with current time 2022-03-05 21:27:45 +01:00
tmp.nix nixos/tmp: Fix format of /tmp mount options 2022-01-31 12:49:29 +01:00