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
|
|
|
|
|
inherit (lib) mkIf mkMerge;
|
|
|
|
|
profiles = config.r6d.profiles;
|
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-07-10 21:23:30 +02:00
|
|
|
in {
|
|
|
|
|
nix = mkIf config.r6d.config-generator.nix-serve-client {
|
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 = [
|
2016-07-11 12:44:27 +02:00
|
|
|
("https://cache.nixos.org/")
|
|
|
|
|
(mkIf (profiles.isDubronetwork && (! computers.isMonstre)) "http://192.168.10.169:5000")
|
2016-07-11 12:05:22 +02:00
|
|
|
(mkIf profiles.isDubronetwork "http://192.168.10.252:5000")
|
|
|
|
|
|
2016-07-21 21:47:51 +02:00
|
|
|
(mkIf (profiles.isPrunetwork && !profiles.isServer) "http://192.168.1.20:5000")
|
2016-07-10 21:23:30 +02:00
|
|
|
];
|
2016-07-21 00:43:15 +02:00
|
|
|
extraOptions = ''
|
|
|
|
|
connect-timeout = 5
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|