builder: Improve garbage collect
This commit is contained in:
parent
22db460211
commit
4590c9fe1f
@ -71,14 +71,16 @@
|
|||||||
nix.optimise.dates = [ "03:15" ];
|
nix.optimise.dates = [ "03:15" ];
|
||||||
|
|
||||||
nix.gc.automatic = true;
|
nix.gc.automatic = true;
|
||||||
nix.gc.dates = "weekly";
|
nix.gc.dates = "daily";
|
||||||
nix.gc.options = "--delete-older-than 30d";
|
nix.gc.options = "--delete-old";
|
||||||
|
|
||||||
# Garbage collect up to 30 GiB when only 5 GiB storage left
|
# nix.settings.keep-derivations = false;
|
||||||
|
# nix.settings.keep-outputs = true;
|
||||||
|
|
||||||
|
# Garbage collect up to 30 GiB when only 6 GiB storage left
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
min-free = ${toString (5 * 1024 * 1024 * 1024)}
|
min-free = ${toString (6 * 1024 * 1024 * 1024)}
|
||||||
max-free = ${toString (30 * 1024 * 1024 * 1024)}
|
max-free = ${toString (30 * 1024 * 1024 * 1024)}
|
||||||
min-free-check-interval = 60
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@ -139,21 +141,21 @@
|
|||||||
port = 3000;
|
port = 3000;
|
||||||
notificationSender = "hydra@julian-mutter.de"; # e-mail of hydra service
|
notificationSender = "hydra@julian-mutter.de"; # e-mail of hydra service
|
||||||
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
||||||
buildMachinesFiles = [ ];
|
# buildMachinesFiles = [ ];
|
||||||
# you will probably also want, otherwise *everything* will be built from scratch
|
# you will probably also want, otherwise *everything* will be built from scratch
|
||||||
useSubstitutes = true;
|
useSubstitutes = true;
|
||||||
|
|
||||||
minimumDiskFree = 5; # in GB
|
minimumDiskFree = 5; # in GB
|
||||||
minimumDiskFreeEvaluator = 2;
|
minimumDiskFreeEvaluator = 4; # in GB
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# add builder itself as build machine so system emulation is properly supported
|
# add builder itself as build machine so system emulation is properly supported
|
||||||
nix.distributedBuilds = true;
|
# nix.distributedBuilds = true;
|
||||||
nix.buildMachines = [
|
nix.buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "localhost";
|
hostName = "localhost";
|
||||||
protocol = null;
|
protocol = null;
|
||||||
|
# sshUser = "nix";
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user