Partitioning, installation on 2 disks

Good evening, everyone.
For a first contact, I would like to congratulate all the contributors to this remarkable distribution.
I would like to use both disks (ssd 256G +hdd 1T) of my Dell Precision 7510 for a single boot installation. Usually I partition the ESP and the / on SSD and swap and /home on HDD. If I understand correctly, for NixOs I would put /boot efi and / on ssd and possibly swap on HDD. A bit of a shame not to exploit all the 2 disks.
I thank you in advance for giving me some advice.
Kind regards

I would definitely put swap on your ssd. It will benefit from the faster disk. For most workloads, a smaller swap on the ssd will perform better than a larger swap on the hdd.

Other than that, you can lay out the disks however you want. If you want to put /home on the hdd, you should be able to.

The interesting question for me is where to put /nix. This is a big directory so moving it to the hhd would save ssd space but it is where all your software lives so there would be some benefit to keeping it on the ssd. I haven’t been using nixos long enough to have played with moving it between higher and lower performing disks.

All that being said, if it was me, and I didn’t want to use a more flexible file system like btrfs or zfs, I would put /, efi and swap on the ssd and mount something like /data on the hdd. You could then bind mount subdirectories of the hdd into the file system where you wanted to store things on the hdd.

For me, it depends on how you intend to use the system and what you plan to store on it.

Please keep in mind, I am relatively new to nixos so others might have different opinions.

1 Like

you can put /home to HDD, no problems. As @dalto mentioned, if you want to use swap as extra-RAM, then put it to SSD, if only for hibernation - then on HDD.

The only advice I’d like to tell you - don’t put /nix on a separate drive, this setup is fragile, because /nix/store is 95% root fs.

/boot can be separate, yes.

Do you plan to use LVM?

1 Like

Thanks to Dalto and Danbst for your prompt and informative responses.
For 8G the swap should “theoretically” be 16G on a HDD (on a SSD?) …
… Although I didn’t feel an express need to exploit the “snapshot” technology to protect my data, and since I’m in the learning phase of this distribution which by the way natively supports ZFS, I have to admit that the adventure is tempting … (by decrypting some points of the “NixOS on ZFS” wiki, which are so far abstruse :slight_smile:
… unless it’s not wiser to use the good old ext4 to first experiment the general philosophy of NixOS ??
Anyway I thank you for your help and your cordiality.

Translated with DeepL Translate: The world's most accurate translator (free version)

1 Like

I do all my installs with zfs now. It is fairly straightforward on nixos.

You just get so much more flexibility. It is a little more difficult to setup.

If you have any questions, feel free to ask.

1 Like

I’d like to do that as well, though as ZFS support on Arch is sub-par.

I’m still thinking through if I’d simply drop Arch Linux or install it on a second partition on a BTRFS as I did on the spinning disk before…

1 Like

Hello to You, after some reflection, I will try the adventure and take some time to study ZSF more closely … Thank you Dalto for your proposal. I will not fail to ask you (sparingly) on the points which will appear too obscure to me…
Yours sincerely

1 Like

Please don’t hesitate to ask. Also, while it may be a little specific to my personal preferences, I would be glad to share my zfs install script with you if it would help get you kickstarted.

If you have the ability to do so, I would also recommend trying it out in a VM first so you can get a feel for how it works.