System-manager and nix store size

Hi,

just trying system-manager for the 1st time. The system I’m using it on does not have too much disk space available. I wonder

  • how one would clean the nix store managed by system-manager, and
  • if it would help to build on another machine?

Thanks!

1 Like

Summoning @zimbatm or @Mic92 - hope you don’t mind :slight_smile:

Do garbage collections and keep the system closures small. Whether you use System-Manager, home-manager, nixOS, or just plain nix doesn’t really change anything about this.

Understand what nix considers garbage and what it doesn’t, and make sure that nix has roughly the same understanding as you.

1 Like

Ah ok, thank you. :folded_hands:

I think in the past I already had a way to list GC roots, etc. on nixos.

So I think I will just try the usual GC commands and see, b/c I had to stop some larger installation. I should see some space being freed up.

I use @linyinfeng’s angrr to automatically clean up gcroots. Example system-manager config:

1 Like

Thank you very much. Will check.

1 Like

Just to close this up. I now have an angrr service similar to yours. Works, ig.

Added another service calling nix-collect-garbage -d every night.

So, thank you again!

1 Like