suelette de config hydra

extraction-donnees-privees
Yves Dubromelle 9 years ago
parent 21d7c97c76
commit 99d5886aff

@ -42,6 +42,8 @@ in
edition-photo = mkEnableOption "Profil pour la création/édition de photos."; edition-photo = mkEnableOption "Profil pour la création/édition de photos.";
edition-video = mkEnableOption "Profil pour la création/édition de video."; edition-video = mkEnableOption "Profil pour la création/édition de video.";
fail2ban = mkEnableOption "Profil pour activer Fail2ban."; fail2ban = mkEnableOption "Profil pour activer Fail2ban.";
hydra-builder = mkEnableOption "Profil pour une machine qui compile pour hydra.";
hydra-server = mkEnableOption "Profil pour un serveur hydra.";
jeux = mkEnableOption "Profil pour les jeux vidéos."; jeux = mkEnableOption "Profil pour les jeux vidéos.";
laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables.."; laptop = mkEnableOption "Profil pour les outils spécifiques aux ordinateurs portables..";
locate = mkEnableOption "Profil pour activer la fonction locate."; locate = mkEnableOption "Profil pour activer la fonction locate.";

@ -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;
#};
}
Loading…
Cancel
Save