mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
nix: add store optimisation and tweak garbage collection
This commit is contained in:
@@ -6,10 +6,18 @@
|
|||||||
nix.settings.cores = 6;
|
nix.settings.cores = 6;
|
||||||
};
|
};
|
||||||
flake.nixosModules.nixUtils = {pkgs-unstable, ...}: {
|
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
|
# Garbage collector of generations
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "Wed *-*-* 16:00:00";
|
||||||
|
persistent = true;
|
||||||
options = "--delete-older-than 7d"; # every week delete generations older than a month
|
options = "--delete-older-than 7d"; # every week delete generations older than a month
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user