Specify times for nix-gc and optimise (assume UTC)
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
_: {
|
||||
{ lib, options, ... }:
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 60d";
|
||||
}
|
||||
// lib.optionalAttrs (options.nix.gc ? dates) {
|
||||
# NixOS
|
||||
dates = lib.mkDefault "00:15";
|
||||
}
|
||||
// lib.optionalAttrs (options.nix.gc ? interval) {
|
||||
# Darwin
|
||||
interval = lib.mkDefault {
|
||||
Hour = 0;
|
||||
Minute = 15;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
_: {
|
||||
{ lib, options, ... }:
|
||||
{
|
||||
nix.settings = {
|
||||
extra-experimental-features = [
|
||||
"nix-command"
|
||||
@@ -11,7 +12,20 @@ _: {
|
||||
download-buffer-size = 1 * 1024 * 1024 * 1024;
|
||||
};
|
||||
|
||||
# Instead of nix.settings.auto-optimise-store, which adds overhead to each
|
||||
# build.
|
||||
nix.optimise.automatic = true;
|
||||
nix.optimise = {
|
||||
# Instead of nix.settings.auto-optimise-store, which adds overhead to each
|
||||
# build.
|
||||
automatic = true;
|
||||
}
|
||||
// lib.optionalAttrs (options.nix.optimise ? dates) {
|
||||
# NixOS
|
||||
dates = lib.mkDefault "00:45";
|
||||
}
|
||||
// lib.optionalAttrs (options.nix.optimise ? interval) {
|
||||
# Darwin
|
||||
interval = lib.mkDefault {
|
||||
Hour = 0;
|
||||
Minute = 45;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user