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?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 3 days ago* (last edited 3 days ago) (5 children)

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" ];
    };
  };
}
  • source
  • hideshow 5 child comments
  • [–] [S] 1 point 3 days ago (4 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 3 days ago* (last edited 3 days ago) (3 children)

    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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] [S] 2 points 3 days ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment