nix: do not optimise store on build, but regularly
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
lib,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
# Apply overlays
|
||||
nixpkgs = {
|
||||
# TODO: apply this to hm and nixos without duplicate code
|
||||
@@ -18,7 +19,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings.auto-optimise-store = lib.mkDefault true;
|
||||
# optimize at every build, slows down builds
|
||||
# better to do optimise.automatic for regular optimising
|
||||
# nix.settings.auto-optimise-store = lib.mkDefault true;
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
@@ -32,6 +35,10 @@
|
||||
# Keep the last 3 generations
|
||||
options = "--delete-older-than +3";
|
||||
};
|
||||
nix.optimise = {
|
||||
automatic = true;
|
||||
dates = [ "weekly" ]; # Optional; allows customizing optimisation schedule
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user