mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-24 17:53:51 -08:00
feat: add nix store optimization and gc options
This commit is contained in:
parent
5ab18f41ca
commit
10e0484f16
1 changed files with 11 additions and 0 deletions
|
@ -28,5 +28,16 @@
|
|||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
optimise.automatic = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
# Free up to 1GiB when there is less than 100MiB left
|
||||
extraOptions = ''
|
||||
min-free = ${toString (100 * 1024 * 1024)}
|
||||
max-free = ${toString (1024 * 1024 * 1024)}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue