i’m running this command:
sudo nixos-rebuild switch --show-trace --install-bootloader
which produces this output:
building the system configuration...
Copied "/nix/store/f8plklbbq3gwkq1wfq89i3f4wy8rabzn-systemd-258/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi".
Copied "/nix/store/f8plklbbq3gwkq1wfq89i3f4wy8rabzn-systemd-258/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI".
Random seed file /boot/loader/random-seed successfully refreshed (32 bytes).
Created EFI boot entry "Linux Boot Manager".
error: Malformed Json: Expecting value: line 1 column 1 (char 0), in /nix/store/szzrs32drnram02x7h5v5dbgk6244wdh-nixos-system-nixos-25.11pre889928.ae814fd3904b/boot.json
Failed to install bootloader
Command 'systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER --collect --no-ask-password --pipe --quiet --service-type=exec --unit=nixos-rebuild-switch-to-configuration /nix/store/q7ni5zvi45jazqbq0mxw46lc1mlsa681-nixos-system-nixos-25.11.20251108.b6a8526/bin/switch-to-configuration switch' returned non-zero exit status 1.
this seems to work fine:
sudo nixos-rebuild build
nothing more is printed with --show-trace for some reason.
building the system configuration...
Done. The new configuration is /nix/store/q7ni5zvi45jazqbq0mxw46lc1mlsa681-nixos-system-nixos-25.11.20251108.b6a8526
just some basic info:
this started happening after i tried mounting a new drive.
i did it my actually just mounting it as i want and regenerating the config after.
the drive can be manually mounted in my latest working generation.
i’m using btrfs but didn’t make the new drive a subvolume, just mounted it as normal.
i did manually alter some mount options in hardware-configuration.nix to add “noatime” and “compress=zstd” but thats it.
the boot.json file it prints the path to is totall empty with a size of 0 bytes. this is indeed malformed json, but i’m really not sure why its empty. this is way beyond me as i literally started nixos yesterday. I have used nix for a while already though so i understand the basic concepts.
Thanks for any help or tips ![]()