1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Fix nix-collect-garbage -d with the new profile location

Low-hanging fix for https://github.com/NixOS/nix/pull/5226#issuecomment-1454669399
This commit is contained in:
Théophane Hufschmitt 2023-03-07 10:33:21 +01:00
parent fc76852b66
commit 2272bc6049
2 changed files with 18 additions and 2 deletions

View file

@ -77,8 +77,7 @@ static int main_nix_collect_garbage(int argc, char * * argv)
return true;
});
auto profilesDir = settings.nixStateDir + "/profiles";
if (removeOld) removeOldGenerations(profilesDir);
if (removeOld) removeOldGenerations(profilesDir());
// Run the actual garbage collector.
if (!dryRun) {