perf: make nix substitutions faster

This commit is contained in:
Moritz Böhme 2025-01-22 09:34:37 +01:00
parent 57a9709745
commit 0e103b7e10
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
2 changed files with 9 additions and 9 deletions

View file

@ -215,18 +215,14 @@
nixConfig = { nixConfig = {
extra-substituters = [ extra-substituters = [
# "https://hyprland.cachix.org" "https://nix-community.cachix.org?priority=2"
"https://nix-community.cachix.org" "https://cache.lix.systems?priority=3"
"https://pre-commit-hooks.cachix.org" "https://pre-commit-hooks.cachix.org?priority=4"
"https://ghostty.cachix.org"
"https://cache.lix.systems"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
]; ];
}; };
} }

View file

@ -68,13 +68,17 @@ in
settings = { settings = {
substituters = [ substituters = [
"https://cache.nixos.org/" "https://cache.nixos.org?priority=1"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
]; ];
trusted-users = [ "root" "@wheel" ]; trusted-users = [ "root" "@wheel" ];
# https://bmcgee.ie/posts/2023/12/til-how-to-optimise-substitutions-in-nix/
http-connections = 128;
max-substitution-jobs = 128;
}; };
}; };
}; };