You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/base/activation-manuelle/nix-serve-client.nix

26 lines
675 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
cfg = config.r6d.config-generator;
computers = config.r6d.computers;
profiles = config.r6d.profiles;
in
mkIf cfg.nix-serve-client {
nix = {
# Cache http pour le store
requireSignedBinaryCaches = false;
binaryCaches = [
(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
'';
};
}