Open Slime90 opened 2 years ago
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
@rycee any reason doExpireGenerations
doesn't just call nix-env --delete-generations
?
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
this also matters to me!
This would also be of use to me.
and to me!
It would be great to have it. I'd like to keep e.g. last three generations. Of course can do it with some script, but its tedious to have it done this way.
Currently, the home-manager --expire-generations option which was added in 2018 only supports expiring generations based on a number of days:
nix allows us to delete generations a number of different ways:
Some of us have their nix environment configured with scripts to keep a certain number of generations instead of relying on the age of the generations, which is useful for garbage collections and keeping aligned with limiting grub environments to retain. Presently it is not possible to retain the same number of nixos and home-manager generations, instead we are forced to expire home-manager generations based on when they happen to have been created, or not at all. If cleanup and garbage collection has not been run in some time, this results in 1 nixos generation being removed, but potentially all non-current home-manager generations.
I am requesting that the expire-generations option for home-manager be updated to as closely possible follow the behavior of nix delete-generations.