nixos/config/nix.nix

28 lines
681 B
Nix
Raw Normal View History

2021-11-02 09:44:06 +01:00
{ pkgs, config, lib, ... }:
2019-02-26 13:44:40 +01:00
let
cfg = config.machine;
in {
2019-02-26 13:44:40 +01:00
nix = {
package = pkgs.nix;
2022-02-02 20:21:14 +01:00
settings = {
max-jobs = 4;
cores = 1;
sandbox = true;
auto-optimise-store = true;
trusted-substituters = [
"https://cache.nixos.org"
] ++ cfg.binaryCaches;
trusted-public-keys = [ (lib.fileContents "${cfg.secretPath}/hydra_cache.pub") ];
substituters = [
"https://cache.nixos.org"
] ++ cfg.binaryCaches;
allowed-users = [ "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
'';
};
}