nixpkgs/nixos/modules
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
..
config Merge pull request #168168 from fedeinthemix/home-mode 2022-05-23 12:27:49 +02:00
hardware nixos: don't put non-firmware in hardware.firmware 2022-05-12 15:17:51 +00:00
i18n/input-method nixos/fcitx5: add the setting of RIME_DATA_DIR and options for rime-data 2022-04-25 13:39:19 +08:00
installer Merge #172668: installation-cd: add more guest tools to NixOS graphical installation base 2022-05-19 12:12:10 +02:00
misc nixos/locate: clarification in warning message (#173247) 2022-05-17 16:47:33 +02:00
profiles Merge pull request #169113 from ElvishJerricco/systemd-stage-1-installer-tests 2022-04-30 13:18:57 -07:00
programs nixos/gnupg: default to a reasonable pinentry program on headless systems 2022-05-18 18:31:34 +02:00
security Merge pull request #156822 from xfix/wrapper-assert-argc-at-least-one 2022-05-16 18:52:51 +02:00
services Merge pull request #174145 from alarsyo/nextcloud24-php8 2022-05-23 20:23:11 +02:00
system nixos/systemd-boot: fix systemd-boot-builder dowgrade to fail 2022-05-28 13:18:21 +02:00
tasks Merge pull request #171650 from helsinki-systems/feat/config-systemd-package 2022-05-09 10:23:04 +02:00
testing nixos/version: Warn about using the default of system.stateVersion 2022-05-05 12:22:31 +02:00
virtualisation Merge pull request #172131 from euank/ena-2.7.1 2022-05-12 01:38:24 +03:00
module-list.nix Merge pull request #163220 from fleaz/init-r53_ddns 2022-05-22 17:08:55 +02:00
rename.nix nixos/ssmtp: drop module 2022-04-17 00:44:50 +02:00