39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{
|
|
nix.settings = {
|
|
trusted-users = [
|
|
"root"
|
|
"@wheel"
|
|
];
|
|
|
|
# Binary cache configuration
|
|
substituters = [
|
|
"http://c3:5000" # Local cluster cache on c3
|
|
"https://cache.nixos.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
# TODO: Add c3 cache public key here after first deploy of c3
|
|
# Get it with: ssh c3 cat /persist/nix-cache/cache-pub-key.txt
|
|
# "c3-cache:..."
|
|
];
|
|
|
|
# Performance tuning
|
|
max-jobs = "auto"; # Use all cores for parallel builds
|
|
cores = 0; # Each build can use all cores
|
|
max-substitution-jobs = 16; # Faster fetching from caches
|
|
http-connections = 25; # More parallel downloads
|
|
download-attempts = 3; # Retry failed downloads
|
|
};
|
|
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
|
|
# TODO: this should be a secret, maybe
|
|
nix.extraOptions = ''
|
|
access-tokens = github.com=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
|
|
'';
|
|
}
|