Skip to content

Commit

Permalink
Automatic nix garbage collection
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Oct 23, 2024
1 parent 2e5814e commit d9b6d2b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/nix-settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
}
else {
interval = {
Day = 0;
Weekday = 0;
};
};
in {
package = pkgs.nixVersions.latest;
gc =
{
automatic = false;
options = "--delete-older-than 7d";
automatic = true;
}
// interval;
settings = {
Expand Down
1 change: 1 addition & 0 deletions home/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ in {
./jujutsu.nix
./kitty.nix
./mpv.nix
./nix.nix
./nix-index.nix
./packages/simon.nix
./ssh.nix
Expand Down
7 changes: 7 additions & 0 deletions home/nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ ... }:
{
nix.gc = {
automatic = true;
frequency = "weekly";
};
}

0 comments on commit d9b6d2b

Please sign in to comment.