From 2c98ea1e3309989842c01eede6b744ffe68d301b Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sun, 24 Aug 2025 21:39:10 +0300 Subject: [PATCH] nixos/systemd: add upstream units for boot counting These units are needed to be able to experiment with systemd's boot counting functionality (e.g. with out-of-tree bootloaders like lanzaboote), and they cannot easily be added through configuration without patching nixpkgs. They are basically a no-op when boot entries do not contain any counters, so AFAICT there is no disadvantage to them being enabled by default. --- nixos/modules/system/boot/systemd.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 56f6b006eb6b..153ee54cb4b2 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -113,6 +113,10 @@ let "systemd-rfkill.service" "systemd-rfkill.socket" + # Boot counting + "boot-complete.target" + "systemd-bless-boot.service" + # Hibernate / suspend. "hibernate.target" "suspend.target"