|  |  | @ -13,12 +13,28 @@ mkIf cfg.hydra-core { | 
			
		
	
		
		
			
				
					
					|  |  |  |   environment.systemPackages = with pkgs; [ |  |  |  |   environment.systemPackages = with pkgs; [ | 
			
		
	
		
		
			
				
					
					|  |  |  |   ]; |  |  |  |   ]; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # Documentation HYDRA | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   ## Installation | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 1. créer clef SSH : | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #	ssh-keygen -C "hydra@pedro.dubronetwork.fr" -N "" -f /etc/nixos/id_buildfarm | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 2. récupérer la clef publique du serveur ssh + l'ajouter dans les `knownHosts` : | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #	ssh-keyscan localhost | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 3. créer un utilisateur pour gérer hydra | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #	su - hydra | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   #	hydra-create-user jpierre03 --password xxx --role 'admin' | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 4. relancer hydra | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 5. ajouter un vhost à nginx | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 6. relancer nginx | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # 7. le service accessible à hydra.<nom de machine> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   ## Tutoriel | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   # * https://github.com/peti/hydra-tutorial | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   # Services |  |  |  |   # Services | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   ## Hydra |  |  |  |   ## Hydra | 
			
		
	
		
		
			
				
					
					|  |  |  |   # 2. créer un utilisateur pour gérer hydra |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   # su - hydra |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   # hydra-create-user jpierre03 --password xxx --role 'admin' |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   services.hydra = { |  |  |  |   services.hydra = { | 
			
		
	
		
		
			
				
					
					|  |  |  |     enable = true; |  |  |  |     enable = true; | 
			
		
	
	
		
		
			
				
					|  |  | @ -26,6 +42,7 @@ mkIf cfg.hydra-core { | 
			
		
	
		
		
			
				
					
					|  |  |  |     notificationSender = "hydra@${config.networking.hostName}"; |  |  |  |     notificationSender = "hydra@${config.networking.hostName}"; | 
			
		
	
		
		
			
				
					
					|  |  |  |     listenHost = "localhost"; |  |  |  |     listenHost = "localhost"; | 
			
		
	
		
		
			
				
					
					|  |  |  |     minimumDiskFree = 50; # Go |  |  |  |     minimumDiskFree = 50; # Go | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     smtpHost = "localhost"; | 
			
		
	
		
		
			
				
					
					|  |  |  |   }; |  |  |  |   }; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   ## Ménage |  |  |  |   ## Ménage | 
			
		
	
	
		
		
			
				
					|  |  | @ -50,11 +67,10 @@ mkIf cfg.hydra-core { | 
			
		
	
		
		
			
				
					
					|  |  |  |   # accessible à hydra.pedro.dubnronetwork.fr |  |  |  |   # accessible à hydra.pedro.dubnronetwork.fr | 
			
		
	
		
		
			
				
					
					|  |  |  |    |  |  |  |    | 
			
		
	
		
		
			
				
					
					|  |  |  |   nix = { |  |  |  |   nix = { | 
			
		
	
		
		
			
				
					
					|  |  |  |     distributedBuilds = true; |  |  |  |     distributedBuilds = false; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     buildMachines = [ |  |  |  |     buildMachines = [ | 
			
		
	
		
		
			
				
					
					|  |  |  |     #      { hostName = "pedro.dubronetwork.fr"; maxJobs = 2; speedFactor = 10; sshKey = "/etc/nixos/id_buildfarm"; sshUser = "root"; system = "x86_64-linux"; } |  |  |  |     #      { hostName = "pedro.dubronetwork.fr"; maxJobs = 5; speedFactor = 10; sshKey = "/etc/nixos/id_buildfarm"; sshUser = "root"; system = "x86_64-linux"; } | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     ]; |  |  |  |     ]; | 
			
		
	
		
		
			
				
					
					|  |  |  |     extraOptions = "auto-optimise-store = true"; |  |  |  |     extraOptions = "auto-optimise-store = true"; | 
			
		
	
		
		
			
				
					
					|  |  |  |   }; |  |  |  |   }; | 
			
		
	
		
		
			
				
					
					|  |  |  |    |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |