---
title: "Why We’re Moving on From Nix"
description: "Railway replaced its Nix-based builder Nixpacks with Railpack, a Go rewrite that generates BuildKit LLB graphs directly instead of linear Dockerfiles."
url: "https://swe.quest/articles/why-we-re-moving-on-from-nix-3cb8ef181b1a528f"
canonical: "https://blog.railway.com/p/introducing-railpack"
source: "Railway"
published: "2025-03-04"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["build-systems","containers","go","deployment","caching"]
---

# Why We’re Moving on From Nix

A post on [Railway](https://swe.quest/sources/railway.md), published 2025-03-04, 5 min read, Case study. Original: [https://blog.railway.com/p/introducing-railpack](https://blog.railway.com/p/introducing-railpack)

## Summary

Railway replaced its Nix-based builder Nixpacks with Railpack, a Go rewrite that generates BuildKit LLB graphs directly instead of linear Dockerfiles. Nix's commit-pinned versioning made patch-level versions hard to support and turned default bumps into surprise build failures. A single /nix/store layer bloated images, and an injected deployment ID env var invalidated caches. Railpack uses Mise for exact version resolution, locks dependencies from successful builds, and runs an analyze → JSON plan → BuildKit graph pipeline. It also hashes only the env vars each step uses so layers cache correctly, and uses BuildKit secrets, cutting base image sizes by 38% (Node) to 77% (Python).

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [Go](https://swe.quest/tags/go.md) (Languages)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)

## Prerequisites

- Docker image layers ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- BuildKit basics
- Nix package manager

## Keywords

Railpack, Nixpacks, Nix, BuildKit, LLB, Mise, Railway

## Related posts

- [Manually Optimize Deployments on Railway](https://swe.quest/articles/manually-optimize-deployments-on-railway-a679dfa34223c7fb.md): Railway · 2024-12-13 · Medium · 9 min read · Deployment, CI/CD, Containers, Python
  Deploying a FastAPI app on Railway three ways shows large speed differences: the default Nixpacks builder took 1m27s, a slim-based custom Dockerfile took 15 seconds, and pulling a pre-built image from Docker Hub took 6 seconds.
- [Dependency prefixes are a supply chain risk: let's fix them](https://swe.quest/articles/dependency-prefixes-are-a-supply-chain-risk-let-s-fix-them-9228bb37d2c90199.md): Sourcegraph · 2026-05-22 · Medium · 5 min read · Supply chain security, JavaScript, Build systems, Refactoring & migrations
  SemVer range prefixes like ^, ~ and wildcards in package.json act as a trust policy that lets compromised or hijacked packages flow into CI and production on the next install.
- [Counting to 3 with a new builder processing 50M+ monthly builds](https://swe.quest/articles/counting-to-3-with-a-new-builder-processing-50m-monthly-builds-47ae6a690cb417f7.md): Railway · 2026-05-14 · Medium · 8 min read · CI/CD, Virtualization, Build systems, Scaling, Linux
  Railway replaced its docker-buildx-on-GCP-VMs build system with Builder v3: 256-vCPU bare-metal hosts split into eight 32-vCPU microVM build cells running buildkitd, scheduled with a 1-of-3 ring to keep BuildKit caches warm, now peaking at 66,000 builds per hour.
- [Working with NX, Railway and CI/CD](https://swe.quest/articles/working-with-nx-railway-and-ci-cd-0bc2b769ee29696c.md): Railway · 2022-09-16 · Medium · 3 min read · CI/CD, Deployment, Build systems, JavaScript
  A GitHub Actions workflow can deploy only the NX monorepo apps affected by a push to Railway, replacing Railway's built-in GitHub trigger.
- [Improving machine learning iteration speed with faster application build and packaging](https://swe.quest/articles/improving-machine-learning-iteration-speed-with-faster-application-build-and-76fe5935fe0be272.md): Meta Engineering · 2024-01-29 · Medium · 5 min read · Build systems, Developer productivity, ML platforms, Storage systems, Python
  Meta cut ML engineers' build and packaging overhead by double-digit percentages by tackling build non-determinism, pruning dependencies, and replacing monolithic XAR executables with an incremental Content Addressable Filesystem (CAF).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
