Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdlib: use_flake: don't keep old generations around #1089

Merged
merged 1 commit into from Feb 28, 2024

Conversation

voidus
Copy link
Contributor

@voidus voidus commented Apr 17, 2023

Note: Unless there's consensus that this is a good idea, let's talk about it. I've just noticed these things eating up my disk space without manual intervention, and it seemed annoying. And I thought a PR is a nicer discussion base than a feature request.

(I also haven't actually run the code yet 馃槺 I'll get to that in the next days)


This is a pretty significant change for people who care about this, but I'd argue that this is very rarely the case.

The two reasons I can see why one would like to keep an old generation are

  1. Enable rollbacks
  2. Prevent garbage collection

Given that use_flake is always used with a flake.nix file and most probably in a version controlled project, reverting flake.nix seems like an easier way to roll back than fiddling with generations (which would be overridden by direnv pretty soon anyways)

Garbage collection is a better reason imo, but still, actually going back to old versions is probably relatively rare, and stuff isn't collected before nix-collect-garbage is ran anyways.

This is a pretty significant change for people who care about this, but
I'd argue that this is very rarely the case.

The two reasons I can see why one would like to keep an old generation
are
1. Enable rollbacks
2. Prevent garbage collection

Given that use_flake is always used with a flake.nix file and most
probably in a version controlled project, reverting flake.nix seems like
an easier way to roll back than fiddling with generations (which would
be overridden by direnv pretty soon anyways)

Garbage collection is a better reason imo, but still, actually going
back to old versions is probably relatively rare, and stuff isn't
collected before nix-collect-garbage is ran anyways.
@zimbatm zimbatm merged commit d28c3a6 into direnv:master Feb 28, 2024
1 check passed
@zimbatm
Copy link
Member

zimbatm commented Feb 28, 2024

sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants