Skip to content

Commit

Permalink
Enable GC (#4)
Browse files Browse the repository at this point in the history
Wait until 100G is free, then GC until 1TB is free.

Unsure if this will delete recently accessed paths. But will monitor CI
builds to check.
  • Loading branch information
srid authored Sep 27, 2024
1 parent 35624c7 commit 6c91c07
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ in
# To allow building on rosetta
extra-platforms = lib.mkIf isDarwin "aarch64-darwin x86_64-darwin";
};

# When disk space goes low (100GB left), run garbage collection until 1TB is free.
# https://nixos.wiki/wiki/Storage_optimization#Automatic
extraOptions = ''
min-free = ${toString (100 * 1024 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024 * 1024)}
'';
};

nixpkgs = {
Expand Down

0 comments on commit 6c91c07

Please sign in to comment.