Hello, I want to create isolated NixOS installations with a shared boot partition. Meaning accessing two separate NixOS system from the same systemd Linux Boot menu. Both system should function on different drives without access to the other drive.
I tried nixos-enter and rebuild/install to System 2 from System 1 after mounting the boot volume to System 2. But it just overrides the boot entries instead of sharing them.
Then I tried nixos-specialisations in the config and pointing to the mounted System 2 root configuration.nix but the nix-store does not get installed into the correct root of System 2. Is there someway to do this.
Copying/editing the efi entries manually of both separate builds would be my next idea if this is not solvable cleanly in the config or like the first idea.
Thanks for any ideas
I don’t think it’s “possible” [1] to have one bootloader show both installations’ generations. One workaround would be to install two bootloaders and have an entry in each that chainloads into the other one.
Of course it’s possible, but you’d have to write a bunch of python and whatnot, because the current code doesn’t account for your use case. ↩︎
This blog post might be helpful: Hard user separation with NixOS