I ordered a new hard disk drive for my laptop, I should be receiving it tomorrow.
I was using a Samsung EVO 860 since ~5 years and I ordered the Samsung EVO 870, same size which is 500Gb.
I didn’t reinstalled the NixOS on top of my old disk because the partition were using the JFS type and I’d like to go back to EXT4 and keep my existing data, without transferring everything somewhere else.
In order to have a hard disk drive in good health, it is recommended to partition it in a smart way.
Therefore, I have a layout in mind, do you think you could help me and give me your point of view?
you probably don’t need a separate /home partition, unless you plan to use several distros on the same computer (do you?)
if you are dead set on separate partitions, perhaps create them more flexibly (as LVM volumes or ZFS pools)
I’m not sure good modern SSDs actually care, health-wise, how you partition them (except possibly for the alignment, but modern partitioning tools take care of that for you)
depending on the amount of RAM, 8Gb may not be enough swap if you want your computer to be able to hibernate
Apparently, it’s better to separate partition where read/write happens a lot of time (during updates). I remember I saw that in an article where it explained that it is better for the lifespan of the SSD.
you probably don’t need a separate /home partition, unless you plan to use several distros on the same computer (do you?)
No I only plan to use NixOS.
if you are dead set on separate partitions, perhaps create them more flexibly (as LVM volumes or ZFS pools)
No, I want something simple. I don’t want to dive into LVM and ZFS.
I’m not sure good modern SSDs actually care, health-wise, how you partition them
I will try to find this article if I can.
depending on the amount of RAM, 8Gb may not be enough swap if you want your computer to be able to hibernate
Partitioning is always subjective. I like a separate /home, it’s useful for disaster recovery, but it is indeed a bit superfluous on nix hosts (since almost everything else in / will be controlled anyway). Nonetheless, it’s pretty harmless.
Other than that, your / is indeed a big for NixOS - most files that traditionally go there should be kept in /nix. 1GB is a bit little, but I’ve not found myself needing even 20GB. /boot is also on the big end, unless you intend to keep a lot of kernels around.
I also resonate with the LVM suggestion. It’s nice to be able to change your mind without a lot of effort in the future, or if you need to add extra drives when you eventually run out of /home space. LVM is a lot less complex than it might seem initially!
All subvolumes are mount with compression (compress-force=zstd:1) which helps with disk space. Subvolumes is a very good idea because a subvolume can occupy all space in disk and if I need to reinstall the system I can the /home.