How do i rebuild the nixos bootloader from windows?

So, i took my laptop to repair yesterday because the outer frame was pretty messed up, now, i have a dual boot of nixos and windows and when i tried to boot into my nixos bootloader it didnt boot and told me it failed to authenticate, i then deleted the boot file for some reason and i only know just discovered the IT guy just tinkered with my bios and enabled secure boot (somehow, even though i put a password on it) so now i cant boot into nixos and im stuck in windows, how do i rebuild the nixos boot remotely from windows or do i need to just install nixos again?

Have you tried logging in from the live CD and rebuilding your config from there?

how exactly would i do this?

It’s been a while, but you essentially go onto the live CD, mount your existing partitions (like you did when first installing), then nixos-enter and then nixos-rebuild as usual (if I recall correctly). Perhaps someone who has done this more recently can chime in with the details.

Yeah, you can even just re-mount partitions, and then re-issue the full nixos-install command. That will for sure ensure the bootloader gets re-installed.

1 Like

do i need to do this via the CLI installer?

You can use the gnome environment, but you have to do it via the cli

oh alr, ill try this when i get my hands on another usb drive :+1:

This also came up recently:

I guess this way you don’t need to re-install anything else.

2 Likes

yup, this works! thanks! :heart:

1 Like