Specify times for nix-gc and optimise (assume UTC)
This commit is contained in:
@@ -1,7 +1,18 @@
|
|||||||
_: {
|
{ lib, options, ... }:
|
||||||
|
{
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 60d";
|
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 = {
|
nix.settings = {
|
||||||
extra-experimental-features = [
|
extra-experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
@@ -11,7 +12,20 @@ _: {
|
|||||||
download-buffer-size = 1 * 1024 * 1024 * 1024;
|
download-buffer-size = 1 * 1024 * 1024 * 1024;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Instead of nix.settings.auto-optimise-store, which adds overhead to each
|
nix.optimise = {
|
||||||
# build.
|
# Instead of nix.settings.auto-optimise-store, which adds overhead to each
|
||||||
nix.optimise.automatic = true;
|
# 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