when setting up my new laptop i am intending to break /home and /nix into their own partitions. The NVME is 512GB so i am thinking
/ = 20GB
/nix = 50GB
swap = 16GB (2x RAM)
/home = all remaining
Thoughts?
I use ZFS on top of LUKS with the same three-way root/nix/home breakout and a separate SWAP partition.
Works pretty well and sidesteps the partition-sizing issue entirely, since the pools don’t have to be a fixed size.
This is the way. If you don’t mind having your kernel pinned to the latest that ZFS supports.
I suppose you are aiming for impermanence? 50GB seems good enough if you’re not installing too many tools. If you haven’t already, take a look at
nix.*options because they have some storage optimisation options. That and CLI tool callednh, which cleans stuff up for you.{ nix = { settings = { auto-optimise-store = true; }; gc = { automatic = true; dates = "daily"; options = "--delete-older-than 10d"; }; optimise = { automatic = true; dates = [ "weekly" ]; }; }; }Thanks for the info. I was only going to seperate /home onto a different partition, but then I took a look at
sudo du -hs /nixand saw it was 17GB by itself on my current laptop. I was aware of the gc daily thing since i have automatic updates enabled, but I was not aware of the other two storage optimization things.I am a pretty standard desktop user, but i do need some dev tools like androidsdk, flutter, java, and rust.
I just checked my main PC which I use for playing games and development (Android and Rust), and it uses 45GB for
/nixjust afternh clean allwhich deletes all profiles but the current one. 50GB might be a bit tight during a rebuild where you inevitably have two copies of the software, but outside of that, it seems good enough.Right, will bump my /nix partition to 100GB then just to have good room for growth.
You know, if i can setup btrfs from the graphical install that might be the better way to go. I could then make different sub-volumes for
@home@nix, etc. If I really want the quotas that can be enforced on the sub volumes.You could just use disko and define all those btrfs subvolumes and the rest of your partitions in a config.




