Files
nixos-template-base/base/activation-manuelle/nix-serve-client.nix

31 lines
928 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2016-07-22 14:16:20 +02:00
let
2016-08-12 12:46:36 +02:00
inherit (lib) mkIf mkMerge mkThenElse;
2016-07-22 14:16:20 +02:00
cfg = config.r6d.config-generator;
computers = config.r6d.computers;
2016-08-12 12:46:36 +02:00
profiles = config.r6d.profiles;
in
mkIf cfg.nix-serve-client {
2016-08-12 12:46:36 +02:00
nix = {
2016-07-09 21:42:02 +02:00
# Cache http pour le store
requireSignedBinaryCaches = false;
binaryCaches = [
#(mkIf (computers.isRollo) "http://ocean.grudu.net:5001/")
2017-02-19 18:22:27 +01:00
(mkIf (computers.isRollo) "http://192.168.12.6:5001/")
#(mkIf (computers.isOcean) "http://rollo.grudu.net:5001/")
(mkIf (computers.isOcean) "http://192.168.12.5:5001/")
(mkIf (profiles.isDubronetwork && (! computers.isPedro) && (! computers.isRollo)) "http://nix-cache.dubronetwork.fr:5001")
(mkIf profiles.isPrunetwork "https://cache.nixos.org/")
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://nix-cache.dubronetwork.fr:5001")
];
extraOptions = ''
connect-timeout = 5
'';
};
}