nixos/config/nix.nix

22 lines
488 B
Nix

{ config, lib, ... }:
let
cfg = config.machine;
in {
nix = {
maxJobs = 4;
buildCores = 1;
autoOptimiseStore = true;
useSandbox = true;
extraOptions = ''
build-timeout = 86400 # 24 hours
'';
binaryCachePublicKeys = [ (lib.fileContents "${cfg.secretPath}/hydra_cache.pub") ];
trustedBinaryCaches = [
"https://cache.nixos.org"
] ++ cfg.binaryCaches;
binaryCaches = [
"https://cache.nixos.org"
] ++ cfg.binaryCaches;
};
}