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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic nix-collect-garbage option #425

Open
amalgame21 opened this issue Nov 21, 2024 · 3 comments
Open

Periodic nix-collect-garbage option #425

amalgame21 opened this issue Nov 21, 2024 · 3 comments

Comments

@amalgame21
Copy link

Please add Periodic nix-collect-garbage option like nix.gc in NixOS
Not fun when storage is needed for emergency but 'nix-collect-garbage -d` takes time to complete.

@t184256
Copy link
Collaborator

t184256 commented Nov 21, 2024 via email

@pinage404
Copy link
Contributor

pinage404 commented Nov 23, 2024

AFAIK, nix-on-droid does stuff only when running the app

If the app is not launched, there is no reasons that it could take more space ; so, no need to run the garbage collector

Running the garbage collector only when the app is launched could be enough


Maybe we could run a task in background when launching the app (e.g. nix-collect-garbage -d & in something like /etc/bashrc)

If it takes too much resources, maybe we could conditionally run it only if not ran since a period of time and put the current date in a file when running it (i don't know where this file should be)

For convenience, we could add this with options (copied from NixOS)

{
	nix.gc.automatic = true;
	nix.gc.dates = "weekly"; # compare the current date with the within the file
}

@expenses
Copy link

expenses commented Dec 1, 2024

We don't have background services. Ideas are welcome.

#203 adds background services

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

No branches or pull requests

4 participants