From 649be34dcf2ac7fdade3d85651a38e28fd2ba0a1 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Sun, 19 Jul 2026 16:11:17 +1000 Subject: [PATCH] Enable boot.loader.initScript for LXC targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LXC containers share the host kernel — Proxmox starts them by exec'ing /sbin/init directly in the container's rootfs, no bootloader or initrd involved at all. Without boot.loader.initScript.enable, that file isn't wired to launch the current generation, so even a correctly installed system (see the nix-auto-installer bind-mount fix, same underlying issue) could still fail to come up after reboot. This is exactly what nixpkgs' own virtualisation/proxmox-lxc.nix module sets for the same reason. Co-Authored-By: Claude Sonnet 5 --- modules/platforms/lxc.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/platforms/lxc.nix b/modules/platforms/lxc.nix index 77fe82c..412e3e2 100644 --- a/modules/platforms/lxc.nix +++ b/modules/platforms/lxc.nix @@ -5,4 +5,10 @@ boot.loader.grub.enable = false; boot.loader.systemd-boot.enable = false; + + # LXC containers share the host kernel — Proxmox starts them by exec'ing + # /sbin/init directly, no bootloader/initrd involved. Without this, that + # file doesn't correctly launch the current generation, so even a + # correctly-installed system can fail to come up after reboot. + boot.loader.initScript.enable = true; }