From 46e61f0fed516f27f8121269d3cea78edc28c244 Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Tue, 18 Oct 2016 12:59:14 +0200 Subject: [PATCH] config hydra TMP --- public/hydra.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 public/hydra.nix diff --git a/public/hydra.nix b/public/hydra.nix new file mode 100644 index 0000000..253902a --- /dev/null +++ b/public/hydra.nix @@ -0,0 +1,34 @@ +{ config, pkgs, ... }: + +{ + ####################################### HYDRA + + virtualisation.virtualbox.host.enable = true; + + # une fois installé : + # 1. créer chef SSH : ssh-keygen -C "hydra@pedro.dubronetwork.fr" -N "" -f /etc/nixos/id_buildfarm + # 2. récupérer la clef publique du serveur ssh : ssh-keyscan localhost + l'ajouter dans les knownHosts + # 2. créer un utilisateur + # su - hydra + # hydra-create-user jpierre03 --password toto --role 'admin' + # accessible à hydra.pedro.dubnronetwork.fr + services.hydra = { + enable = true; + hydraURL = "http://hydra.pedro.dubronetwork.fr"; + notificationSender = "hydra@${config.networking.hostName}"; + listenHost = "localhost"; + minimumDiskFree = 50; # Go + }; + + programs.ssh.knownHosts."pedro.dubronetwork.fr".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7fjo2ysLqlfSo6BKnc6I6m1ayoPrbwEEyTKZmUzsOD"; + nix = { + distributedBuilds = true; + buildMachines = [ + { hostName = "pedro.dubronetwork.fr"; maxJobs = 2; speedFactor = 10; sshKey = "/etc/nixos/id_buildfarm"; sshUser = "root"; system = "x86_64-linux"; } + ]; + extraOptions = "auto-optimise-store = true"; + }; + # nix.gc = { + # automatic = true; + #}; +}