From 7d36daa76ab7e3ab3262ec0c34f712b3c343efed Mon Sep 17 00:00:00 2001 From: Peter Marshall Date: Fri, 9 May 2025 14:28:49 -0400 Subject: [PATCH] nixos/systemd-stage-1: follow systemd /run propagation We currently bypass systemd's switch-root logic by premounting /sysroot/run. Make sure to propagate its sub-mounts with the recursive flag, in accordance with the default switch-root logic. This is required for creds at /run/credentials to survive the transition from initrd -> host. --- nixos/modules/system/boot/systemd/initrd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index fd081d44cbd8..5f39f29e65bb 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -642,7 +642,7 @@ in { where = "/sysroot/run"; what = "/run"; - options = "bind"; + options = "rbind"; unitConfig = { # See the comment on the mount unit for /run/etc-metadata DefaultDependencies = false;