mirror of
				https://gitlab.com/ahoneybun/ahoneybun-net.git
				synced 2025-11-03 23:48:17 -07:00 
			
		
		
		
	finish blog post
This commit is contained in:
		
							parent
							
								
									075ff0f9df
								
							
						
					
					
						commit
						67c96f9605
					
				
					 1 changed files with 11 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -1,18 +1,18 @@
 | 
			
		|||
+++
 | 
			
		||||
title = "Welcome to Hydra"
 | 
			
		||||
date = 2025-05-17
 | 
			
		||||
date = 2025-05-18
 | 
			
		||||
draft = false
 | 
			
		||||
 | 
			
		||||
[taxonomies]
 | 
			
		||||
categories = [ "nixos" ]
 | 
			
		||||
tags = [ "nixos", "nixos-25.05" ]
 | 
			
		||||
tags = [ "nixos", "nixos-server", "nixos-25.05", "hydra"]
 | 
			
		||||
+++
 | 
			
		||||
 | 
			
		||||
## CB (Continuous Build system)
 | 
			
		||||
# CB (Continuous Build system)
 | 
			
		||||
 | 
			
		||||
This is what [NixOS](https://hydra.nixos.org/) itself uses for building packages for it's [channels](https://nixos.wiki/wiki/Nix_channels). Setting it up yourself on NixOS is pretty easy with this nix config:
 | 
			
		||||
 | 
			
		||||
```nix
 | 
			
		||||
```nix,linenos
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -28,11 +28,11 @@ This is what [NixOS](https://hydra.nixos.org/) itself uses for building packages
 | 
			
		|||
 | 
			
		||||
once you add that to your `configuration.nix` (or another nix file that you import) and rebuild you'll find it running on port 3000 (localhost:3000). For creating a project and other admin roles I would recommand looking at [this page](https://nixos.wiki/wiki/Hydra).
 | 
			
		||||
 | 
			
		||||
### Your own nixpkgs
 | 
			
		||||
## Your own nixpkgs
 | 
			
		||||
 | 
			
		||||
I started my own [nixpkgs repository](https://gitlab.com/ahoneybun-nix/nixpkgs) recently and this is my flake:
 | 
			
		||||
 | 
			
		||||
```nix
 | 
			
		||||
```nix,linenos
 | 
			
		||||
{
 | 
			
		||||
  description = "Aaron Honeycutt's packages";
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -70,7 +70,7 @@ With this you can run `nix build .#honeyfetch` (one of the packages in that repo
 | 
			
		|||
 | 
			
		||||
{{ figure(src="/images/nixos-hydra-ci/built-x86-64-linux.png", alt="Hydra building for x86_64-linux", caption="Hydra building for x86_64-linux") }}
 | 
			
		||||
 | 
			
		||||
## Building for other architectures
 | 
			
		||||
# Building for other architectures
 | 
			
		||||
 | 
			
		||||
NixOS is great at supporting 4 main architectures (known as Platforms):
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -83,7 +83,7 @@ there is a 5th one which is i686-linux though it is not as common.
 | 
			
		|||
 | 
			
		||||
Hydra can build for all of them and this example we'll add aarch64-linux (for devices such as the Raspberry Pi in my case), this is how our Hydra configuration looks with that enabled:
 | 
			
		||||
 | 
			
		||||
```nix
 | 
			
		||||
```nix,linenos
 | 
			
		||||
{ config, pkgs, lib, ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -112,3 +112,6 @@ If you just want to build for x86_64-linux or a certain Platform only you can us
 | 
			
		|||
 | 
			
		||||
{{ figure(src="/images/nixos-hydra-ci/built-systems.png", alt="Hydra building for x86_64-linux and aarch64-linux", caption="Hydra building for x86_64-linux and aarch64-linux") }}
 | 
			
		||||
 | 
			
		||||
# Other questions
 | 
			
		||||
 | 
			
		||||
For more reading I have my nix files hosted on GitLab [here](https://gitlab.com/ahoneybun-nix/nix-configs/-/tree/main/homelab). Reach out to my on Mastodon for questions!
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue