spread nix store optimiser over time
This commit is contained in:
parent
6625e9c1f3
commit
568c968ca8
11 changed files with 18 additions and 13 deletions
|
|
@ -1,13 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
randomHour = import ../lib/randomHour.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
nix = {
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "${toString randomHour config.networking.hostName}:00" ];
|
||||
};
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "01:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "02:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "03:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
../../services/openssh.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "00:00" ];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "megaraid_sas" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "04:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "05:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "06:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "07:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@
|
|||
../../services/openssh.nix
|
||||
../../services/etcd.nix
|
||||
];
|
||||
|
||||
nix.optimise.dates = [ "08:00" ];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{ lib }:
|
||||
hostname:
|
||||
|
||||
let
|
||||
hash = builtins.hashString "sha256" hostname;
|
||||
n = lib.strings.toIntBase 16 (builtins.substring 0 8 hash);
|
||||
in
|
||||
n % 24
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue