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