Installing NixOS alongside an already-existing Fedora 40

Hey!
I have a laptop with Fedora 40 installed. I wanted to install NixOS on dual boot to play with it and test new things.
Booted from USB Stick, launched the installer… Blah blah blah.
When selecting the partitionning options, I chose “install alongside”

However, when running the installation, it stopped at 8/11% (when partitionning then) with this error

I also tried to shrink my Fedora partition by hand before the installation and using the newly-freed space for NixOS, but when rebooting my computer, it was instantly booting to Nix and I had to go to my BIOS to chose Fedora

I’m not sure what the installer does, but it seems like some mounting failed. If it was me, I would manually (re)partition.

I’ve never done that before. All OSes i had before (even Nix) were installed “automatically”.
Can someone give me the steps I should follow ? (or link me to a tutorial, something like that)
Thanks

https://nixos.org/manual/nixos/stable/#sec-installation-manual
Of course you will want to adapt the instructions in such a way as to not destroy the existing partitions.
(Also, back up your data, externally.)

Also, you can just use a graphical partitioning tool (like gparted) instead of parted commmand.

I recommend ZFS for ease of use.

I would recommend against ZFS, for ease of use.
(There are many pitfalls, documented on ZFS - ArchWiki, that will result in data loss. Additionally, you’ll have to ensure you use a compatible kernel. Overall it’s just additional complexity.)

Use ext4 if you’re not sure what to pick. Shrink the existing partition with gparted, add a new ext4 partition for NixOS. And keep the existing /boot, you don’t want two ESPs on the same drive, some firmwares can get confused.

1 Like