Auto free nix store when almost full

This commit is contained in:
Sandro - 2022-12-14 20:55:02 +01:00
parent a789ba633e
commit 5cbd4ee6a5
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 9 additions and 10 deletions

View File

@ -395,6 +395,11 @@ in
nix = { nix = {
settings = { settings = {
builders-use-substitutes = true;
connect-timeout = 20;
experimental-features = "nix-command flakes";
fallback = true;
# don't self feed hydra
trusted-public-keys = lib.mkIf (config.networking.hostName != "hydra") [ trusted-public-keys = lib.mkIf (config.networking.hostName != "hydra") [
(builtins.readFile ../hosts/hydra/cache-pub.key) (builtins.readFile ../hosts/hydra/cache-pub.key)
]; ];
@ -418,10 +423,6 @@ in
url = "https://gitea.c3d2.de/C3D2/nix-config.git"; url = "https://gitea.c3d2.de/C3D2/nix-config.git";
}; };
}; };
extraOptions = ''
experimental-features = nix-command flakes
builders-use-substitutes = true
'';
}; };
services.openssh = { services.openssh = {

View File

@ -59,13 +59,11 @@
}; };
nix.settings = { nix.settings = {
min-free = 128000000;
max-free = 1000000000;
# fetch github-prebuilt microvm-kernels # fetch github-prebuilt microvm-kernels
substituters = [ substituters = [ "https://microvm.cachix.org" ];
"https://microvm.cachix.org" trusted-public-keys = [ "microvm.cachix.org-1:oXnBc6hRE3eX5rSYdRyMYXnfzcCxC7yKPTbZXALsqys=" ];
];
trusted-public-keys = [
"microvm.cachix.org-1:oXnBc6hRE3eX5rSYdRyMYXnfzcCxC7yKPTbZXALsqys="
];
}; };
environment.systemPackages = [ ( environment.systemPackages = [ (