From 67c96f9605459a4b59309dfaf30f2e1b8aad6fa9 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Sat, 17 May 2025 17:52:27 -0600 Subject: [PATCH] finish blog post --- content/posts/nixos-hydra-ci.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/content/posts/nixos-hydra-ci.md b/content/posts/nixos-hydra-ci.md index 2e61482..eba5fe1 100644 --- a/content/posts/nixos-hydra-ci.md +++ b/content/posts/nixos-hydra-ci.md @@ -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!