2016-07-10 21:23:30 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2016-07-22 14:16:20 +02:00
|
|
|
|
2016-07-10 21:23:30 +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;
|
2016-07-11 12:29:53 +02:00
|
|
|
computers = config.r6d.computers;
|
2016-08-12 12:46:36 +02:00
|
|
|
profiles = config.r6d.profiles;
|
2016-08-11 23:47:50 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
|
|
mkIf cfg.nix-serve-client {
|
2016-08-12 12:46:36 +02:00
|
|
|
|
2016-08-11 23:47:50 +02:00
|
|
|
nix = {
|
2016-07-09 21:42:02 +02:00
|
|
|
# Cache http pour le store
|
2016-07-09 21:42:44 +02:00
|
|
|
requireSignedBinaryCaches = false;
|
2016-07-10 21:23:30 +02:00
|
|
|
binaryCaches = [
|
2017-02-19 18:20:12 +01:00
|
|
|
#(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/")
|
2017-02-19 18:20:12 +01:00
|
|
|
#(mkIf (computers.isOcean) "http://rollo.grudu.net:5001/")
|
|
|
|
|
(mkIf (computers.isOcean) "http://192.168.12.5:5001/")
|
2017-02-19 18:10:48 +01:00
|
|
|
|
2016-08-12 01:35:04 +02:00
|
|
|
(mkIf (profiles.isDubronetwork && (! computers.isPedro) && (! computers.isRollo)) "http://nix-cache.dubronetwork.fr:5001")
|
2016-07-11 12:05:22 +02:00
|
|
|
|
2016-08-12 01:35:04 +02:00
|
|
|
(mkIf profiles.isPrunetwork "https://cache.nixos.org/")
|
2016-09-27 23:07:44 +02:00
|
|
|
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://nix-cache.dubronetwork.fr:5001")
|
2016-07-10 21:23:30 +02:00
|
|
|
];
|
2016-07-21 00:43:15 +02:00
|
|
|
extraOptions = ''
|
2016-08-11 23:47:50 +02:00
|
|
|
connect-timeout = 5
|
2016-07-21 00:43:15 +02:00
|
|
|
'';
|
2016-08-11 23:47:50 +02:00
|
|
|
};
|
|
|
|
|
}
|