home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

bug: home manager as a NixOS module makes its own GC roots which are not deleted even when specifying --delete-generations

Open eldritch-cookie opened this issue 1 year ago • 7 comments

Are you following the right branch?

  • [X] My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • [X] I have searched the existing issues

Issue description

I noticed that my disk usage was too high so i printed all gc roots and saw the gc roots from home-manager, this is not documented anywhere and is quite unexpected, i assumed that specifying delete generations would remove everything from those generations on my system.

what happens if i need to rollback my system configuration and i've deleted the corresponding home-manager generation?

how can i delete these gc roots besides by using rm on them manually?

Maintainer CC

No response

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.62, NixOS, 23.11 (Tapir), 23.11.20231117.c757e9b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/store/0y446mjvwzrhv723jh0lpkaz9gw8jzbq-source`

eldritch-cookie avatar Nov 18 '23 23:11 eldritch-cookie