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?

  • dgdft@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    18 days ago

    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.

  • [object Object]@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    18 days ago

    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" ];
        };
      };
    }
    
    • shortwavesurfer@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      18 days ago

      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.

      • [object Object]@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        18 days ago

        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.

        • shortwavesurfer@lemmy.zipOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          18 days ago

          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.

          • boatswain@infosec.pub
            link
            fedilink
            English
            arrow-up
            1
            ·
            18 days ago

            You could just use disko and define all those btrfs subvolumes and the rest of your partitions in a config.