mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-10-11 01:12:43 +02:00
nix: add store optimisation and tweak garbage collection
This commit is contained in:
1 parent
4fcbc31629
commit
9e6e278c72
1 file changed
+9
-1
@@ -6,10 +6,18 @@
|
||||
nix.settings.cores = 6;
|
||||
};
|
||||
flake.nixosModules.nixUtils = {pkgs-unstable, ...}: {
|
||||
# Optimise the nix store
|
||||
nix.optimise = {
|
||||
automatic = true;
|
||||
persistent = true;
|
||||
randomDelaySec = "30min";
|
||||
dates = "Thu *-*-* 16:00:00";
|
||||
};
|
||||
# Garbage collector of generations
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
dates = "Wed *-*-* 16:00:00";
|
||||
persistent = true;
|
||||
options = "--delete-older-than 7d"; # every week delete generations older than a month
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user