2021-11-02 09:44:06 +01:00
|
|
|
{ pkgs, config, lib, ... }:
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-12-14 07:46:00 +01:00
|
|
|
let
|
|
|
|
cfg = config.machine;
|
|
|
|
in {
|
2019-02-26 13:44:40 +01:00
|
|
|
nix = {
|
|
|
|
maxJobs = 4;
|
|
|
|
buildCores = 1;
|
|
|
|
autoOptimiseStore = true;
|
|
|
|
useSandbox = true;
|
2021-11-02 09:44:06 +01:00
|
|
|
package = pkgs.nix_2_4;
|
|
|
|
allowedUsers = [ "root" ] ++ (map (n: n.name) cfg.administrators);
|
2019-02-26 13:44:40 +01:00
|
|
|
extraOptions = ''
|
|
|
|
build-timeout = 86400 # 24 hours
|
2021-11-02 09:44:06 +01:00
|
|
|
experimental-features = nix-command flakes
|
2019-02-26 13:44:40 +01:00
|
|
|
'';
|
2019-12-14 07:46:00 +01:00
|
|
|
binaryCachePublicKeys = [ (lib.fileContents "${cfg.secretPath}/hydra_cache.pub") ];
|
2019-02-26 13:44:40 +01:00
|
|
|
trustedBinaryCaches = [
|
2019-03-04 10:35:50 +01:00
|
|
|
"https://cache.nixos.org"
|
2019-12-14 07:46:00 +01:00
|
|
|
] ++ cfg.binaryCaches;
|
2019-02-26 13:44:40 +01:00
|
|
|
binaryCaches = [
|
2019-03-04 10:35:50 +01:00
|
|
|
"https://cache.nixos.org"
|
2019-12-14 07:46:00 +01:00
|
|
|
] ++ cfg.binaryCaches;
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
|
|
|
}
|