From 4ecabf5d48e80d2abe3847353b4471ee6cf2aea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Sep 2026 07:58:35 +0200 Subject: [PATCH] nixos/systemd: patch to avoid failure during systemd reexec This regressed in a2509279570758b71f4dd283bc509ee5c78c3a53 --- nixos/modules/system/boot/systemd.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index f48256a599a5..85693da630c6 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -244,7 +244,21 @@ in options.systemd = { - package = mkPackageOption pkgs "systemd" { }; + package = mkPackageOption pkgs "systemd" { } // { + apply = + pkg: + pkg.overrideAttrs (prevAttrs: { + patches = prevAttrs.patches or [ ] ++ [ + # Remove this with v261.5; it fixes an issue with switch-to-configuration + # https://github.com/NixOS/nixpkgs/pull/558350#issuecomment-5740583354 + (pkgs.fetchpatch { + name = "postpone-d-bus-queue-dispatch.patch"; + url = "https://github.com/systemd/systemd/commit/266b3e50218e2b27cd67d2371c165bf53ad3bf00.patch"; + hash = "sha256-dEEzZUqicnmgDuXVBV1y0BxzgKbb6Q47Dmxj+O71bFE="; + }) + ]; + }); + }; enableStrictShellChecks = mkEnableOption "" // { description = ''