If you are still using standard Nix flakes or tools like niv and npins for input pinning, you are seriously missing out! 🚨 While Nix flakes brought us a long way toward reproducibility, they have hidden limitations that slow down development and limit your freedom. Do you enjoy redownloading massive tarballs (like a 45GB AI model) just to check if they've updated? What happens when GitHub goes down and your inputs have no mirror fallback? What if some project uses Fossil, Pijul, or Darcs instead of Git? The latest blog post by toastal on Nixcademy introduces a complete game-changer: Nixtamal. Nixtamal is the missing piece to your Nix setup, providing features that standard flakes and existing tools simply don't have: 🚀 Custom Freshness Commands: Define how to check if an input is stale using simple shell commands (e.g., checking an API). No more wasteful, multi-gigabyte redownloads! 🪞 Mirror Support: Ensure your builds don't fail by falling back to mirrors when your primary forge is down or rate-limited. 🛠️ Pre-import Patching: Awaiting a Nixpkgs PR? Nixtamal lets you apply patches to the input itself before importing! ⚡ Faster Hashing: Override the hash algorithm on a per-input basis and leverage the blazing-fast BLAKE3 algorithm. 🌍 VCS Agnostic: Go beyond Git and Mercurial. Use Subversion, Fossil, Darcs, or Pijul without waiting for C++ Nix binary updates. Stop letting traditional flakes limit you. Unlock better inputs, save bandwidth, and regain complete control over your dependency management. Read the full deep-dive here and see what you've been missing: https://lnkd.in/eEGaibBq #Nix #NixOS #DevOps #SoftwareEngineering #Automation #Nixtamal #Reproducibility
Nixcademy
Education Administration Programs
🚢 Ship great software faster! 🚀 Nix & NixOS 101 3-5 Days Battle-Tested Corporate Training Class
About us
🚢 Ship great software faster! 🚀 We turn your staff into competent, unstoppable Nix users. with the Nix & NixOS 101 3-5 Days Battle-Tested Corporate Training Class
- Website
-
https://nixcademy.com
External link for Nixcademy
- Industry
- Education Administration Programs
- Company size
- 2-10 employees
- Type
- Educational
- Specialties
- Training, Nix, NixOS, and DevOps
Employees at Nixcademy
Updates
-
It's time to learn some Nix again! Whom of you are strong enough, capable enough in your Nix-dom, that you'd figure out what the (well-established) Nix anti-pattern in the image is? None? Some? Turn on notifications for more brilliant Nix education from the future (or is it the past 🫢)! To receive an excerpt from our book about this very topic, follow us, comment "anti-patterns" and DM us "anti-patterns"! ```nix { pkgs, ... }: { programs.firefox = { enable = true; package = pkgs.firefox.overrideAttrs { patches = [ ./some-firefox-patch.patch ]; }; preferences = { "nglayout.initialpaint.delay" = 0; }; }; } ```
-
-
The NixOS integration tests have always been a fantastic tool. We just made them even faster and much simpler to run! 🚀 By adding a new lightweight container backend to the test driver, you can now run your suites on standard, non-KVM VMs. 👇 Here is what the new container backend brings to your NixOS workflow: ⚡ Blazing Fast Execution: How fast? Booting two systems, letting them ping each other, and tearing them down now takes ~3 seconds! 💸 Run Anywhere (Cheaper!): You no longer need bare-metal KVM-enabled hosts. Your tests can now run seamlessly on cheap, standard VMs. 🎮 GPU Testing Support: Hardware acceleration is now accessible. You can finally test GPU-dependent workloads directly inside your integration tests! Curious how it works under the hood and how to enable it in your projects? Dive into our latest article and try it out for yourself! 🔗 Read the full breakdown here: https://lnkd.in/eVTSGFrQ #NixOS #DevOps #Testing #Linux #Nix #InfrastructureAsCode #CI #Containers
-
-
Nixcademy reposted this
Jacek Galowicz Thanks for the great talk about the NixOS testing framework Southern California Linux Expo NixOS Foundation
-
-
Nixcademy reposted this
#PlanetNix Speaker Announcement! Long-time Nix user, maintainer of the NixOS integration test driver, C++ book author and the Founder of Nixcademy. Make sure to join Jacek Galowicz's talk: Mastering NixOS Integration Tests: VMs, Containers & Advanced Debugging In this hands-on session, we will move beyond standard VMs to explore the new Container backend for high-speed, low-overhead testing. Learn to debug flaky tests by freezing the sandbox, utilize VSOCK for interactive shells, and set up GPU-enabled tests. Whether you are a maintainer or a DevOps engineer, you will leave with the code to build robust, cost-effective CI pipelines. Save your spot! https://buff.ly/KYMiX4N
-
-
Huge thanks to Ethan Carter Edwards for the thoughtful review of Nix Anti-Patterns! We’re thrilled to see the chapter on Evaluation Purity resonating—especially the points on pinning Nixpkgs and maintaining determinism. It’s an honor to have our work mentioned alongside your seminar at the Harvard Systems Reading Group! 📖 Heading to Planet Nix next week? We’ll be giving out physical copies of the book! Come find the Nixcademy team to grab yours and chat about Nix best practices.
This weekend, I had the chance to look through Nix Anti-Patterns by Nixcademy (thanks for sending it over)! There's a lot of good info in this book, and I wanted to take the minute to highlight my favorite chapter. Coincidentally, I also taught a seminar on NixOS and Nix at the Harvard Systems Reading Group this weekend where I emphasized a similar topic. Nix is quite difficult to understand and its UX can leave a bit to be desired at times. I found that this book presented some digestible examples for both new and experienced users, and communicates lessons in a clear way. In the chapter Evaluation purity, Nix Anti-Patterns warns against implicitly importing Nixpkgs without pinning to a specific version. While there are a number of methods to pin imports (npins, niv, flakes, fetching a specific revision), a common footgun I see new users make is assuming that all Nixpkgs imports resolve to the same version (or even the same branch). This is not necessarily true, and can change depending on the machine. Similarly, it recommends importing with a specific Nixpkgs config as to not unintentionally modify one's configuration. While this functionality is included for historical reasons, I've seen it cause a lot of confusion! Both of these chapters emphasize taking advantage of Nix's deterministic and reproducible features. The book's pretty neat, and I recommend that anyone wanting to learn Nix at a deeper level or is looking for resources to introduce Nix in their companies reach out to Nixcademy to learn more!
-
Nixcademy reposted this
This weekend I had the chance to read the book Nix Anti-Patterns by Nixcademy, and I wanted to share my impressions and my favourite entries. Nix always had a reputation for a steep learning curve and lacking documentation. Though this has improved greatly over the years on the official venues, it's nice to see how the community has contributed their own pieces of advice and resources to help fill the gaps. Nix Anti-Patterns is a good resource because, in its short form, it discusses the rationale behind why the anti-patterns fall short and offers quick, actionable advice on several areas that you can apply even if you just maintain a flake or two. I think it’s particularly helpful when you're starting out, though even as someone who has used Nix for a few years, I still found valuable takeaways! It also contains useful links to the official Nixpkgs manual for ease of reference. Now, on to my favourite anti-patterns from the book. The one I related to the most is "Keep the derivations ready for cross-compilation". I remember early on in my Nix journey having a hard time making sense of what the difference was between "buildInputs", "nativeBuildInputs", and so on. When I started to delve into cross-compilation with Nix, something that the tool is extremely great at, I was even more confused when I reached the "Theory of dependency categorization" from the Nixpkgs manual and things like "depsBuildBuild" entered the lexicon. As I said before, the Nix Anti-Patterns book is short form and won't solve all things cross-compilation with Nixpkgs for you, but will certainly help you when you're starting. One I found funny is "Separate host and guest packages" because I remember running into the very same issue when I first started exploring the NixOS testing framework (also an impressive tool). Thankfully, I was attempting to run the NixOS tests from a macOS machine and quickly noticed something was amiss! Lastly, I want to mention "Use specialized flag instead of phase overrides" because it reminded me that I still have a path to tread when it comes to finely manipulating build phases and writing derivations. This anti-pattern invited me to keep delving deeper into what Nix can do. This makes me wonder what a deeper and long-form Nix book would look like. Recommended!
-
So you created your favorite product system image, minimized it, tested its systemd-sysupdate over-the-air update capabilities, your CI automatically tests it in sandboxed virtual networks, and you are happy with it. Now your carefully engineered product wants to be deployed to a smaller embedded system without hassle? Maybe even from your Mac? The final piece of the NixOS appliance image blog post series puzzle is here, and we are tackling one of the nastiest challenges in embedded systems and make it look easy: Cross-Compilation. We started with the basics and progressively added advanced capabilities: 🔹 Part 1: Making "self-inflating" NixOS images that automatically resize their filesystems on first boot using systemd-repart 🔹 Part 2: Learn how to use builtin Nix capabilities to minimize images 🔹 Part 3: Implementing robust, atomic auto-updates with systemd-sysupdate 🔹 Part 4: Cross-compiling the image from any platform to any platform If you are building IoT devices or optimized cloud images, you rarely build on the target hardware. You want to build here (e.g., a powerful x86 server or a MacBook) to deploy there (e.g., ARM64 Raspberry Pi, small RISCV board or whatever small system). In this final guide, we provide a scalable Nix Flake architecture designed to handle this elegantly. We move beyond simple cross-compilation hacks and show you how to: ✅ Strictly separate system configuration from build platform metadata. ✅ Automatically generate every combination of build/host platform (the Cartesian product). ✅ Build Linux images effortlessly even from macOS. This is the blueprint for a maintainable, multi-architecture build pipeline. Call to Action: Read the full article and grab the complete example code from the repository below. 👉 Read the Article: https://lnkd.in/gbi-m-Fa 👉 Get the Code: https://lnkd.in/ghnMg_wW #NixOS #Nix #DevOps #EmbeddedSystems #IoT #CrossCompilation #Linux
-