diff --git a/common.nix b/common.nix index 843b344..c18a881 100644 --- a/common.nix +++ b/common.nix @@ -138,7 +138,16 @@ if nix eval --refresh --json --extra-experimental-features "flakes nix-command" disko --mode destroy,format,mount \ --flake "''${FLAKE_BASE_URL}#''${choice}" --yes else - echo "Selected host has no Disko configuration." + # No raw disk to partition — true for every LXC container, which has + # no block device visible from inside it, only its already-mounted + # root filesystem. nixos-install defaults to installing into /mnt; if + # nothing points /mnt at the real root, the new system gets built and + # written to a disconnected empty directory, never actually becomes + # bootable, and the container silently keeps running this installer + # environment forever. Bind-mount / onto /mnt so the install actually + # lands on the filesystem this container boots from. + echo "Selected host has no Disko configuration — installing in place via bind mount." + mount --bind / /mnt fi # sops-nix derives this host's decryption key from its own SSH host key