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.
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.
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 called nh, 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 /nix and 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 /nix just after nh clean all which 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.
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.
Right, will bump my /nix partition to 100GB then just to have good room for growth.
all 8 comments