SlideShare a Scribd company logo
Packaging services with Nix
By Jonas Chevalier (aka. zimbatm)
Hi !
Real-world
experience
“Excel on steroids”
http://www.alphasheets.com/
● Mono-repo
● Frontend written in React-js
● Backend written in Haskell +
python + Java + R
● Deploying on Kubernetes
What is Nix?
Pure build system + Functional language
≃
Composable + Reproducible builds
https://nixos.org/nix/
Composable? Reproducible?
Key: “/nix/store/${sha256(build inputs)}”
Value: sandbox-build(build inputs)
=> tree
Language?
{ lib, mkYarnPackage, srcPath ? ../../frontend }:
mkYarnPackage {
src = srcPath;
packageJson = srcPath + "/package.json";
yarnLock = srcPath + "/yarn.lock";
buildPhase = ''
yarn build
'';
installPhase = ''
mkdir -p $out/var
cp -r dist/ $out/var/www
'';
}
Nixpkgs
https://github.com/nixos/nixpkgs
~12k packages
Actively maintained w/ security updates
Binary cache
TODO app
https://github.com/numtide/todo
mvc-nix
Use TodoMvc as an example
CI / CD pipeline
Monorepo -> Docker image -> Push to registry -> Deploy changes
What do we want?
CI
☐ Only build what has changed
☐ Run tests when the code has changed
☐ Build containers from each services
☐ Only ship the runtime dependencies
☐ Manage security updates
Developer
☐ Application dependencies available
☐ Reduced dev/prod parity for debugging
☐ Access to pre-built binaries
Demo
Wish me luck
What do we get?
CI
☑ Only build what has changed
☑ Run tests on all the code that has changed
☑ Push containers to registry
☑ Only ship the runtime dependencies
☑ Manage security updates
Developer
☑ Application dependencies available
☑ Reduced dev/prod parity for debugging
☑ Access to pre-built binaries
Some downsides
● Not mainstream yet, less StackOverflow juice
● Developers are now required to install Nix
● Limited incremental builds compared to language-specific
● Missing tool to cull the container images
● Nix slower than Yarn on fetch
The
end
Questions ?
Thanks
https://zimbatm.com/
https://twitter.com/zimbatm/
https://github.com/numtide/todomvc-nix
Docker Problems
● Unnecessary rebuilds
○ With shared libraries
● Handle security updates
● Only run tests for components that change
● Minimal containers, don’t ship build dependencies
● Developer dependencies
● Dockerfiles are not composable
Packaging Services with Nix

More Related Content

PDF
Nodejs - Should Ruby Developers Care?
PDF
Nodejs a-practical-introduction-oredev
PDF
Nodejs - A-quick-tour-v3
PDF
Nomad, l'orchestration made in Hashicorp - Bastien Cadiot
KEY
Node.js - As a networking tool
PDF
Server-Side JavaScript Developement - Node.JS Quick Tour
PDF
Dirty - How simple is your database?
PPTX
Node.js
Nodejs - Should Ruby Developers Care?
Nodejs a-practical-introduction-oredev
Nodejs - A-quick-tour-v3
Nomad, l'orchestration made in Hashicorp - Bastien Cadiot
Node.js - As a networking tool
Server-Side JavaScript Developement - Node.JS Quick Tour
Dirty - How simple is your database?
Node.js

What's hot (19)

PPTX
HTML5 Programming
PDF
Boosting I/O Performance with KVM io_uring
PDF
Caching in Docker - the hardest thing in computer science
PDF
Docker Insight
PDF
Jan Čurn: Meteor: the full-stack JavaScript framework
PDF
Security in a containerized world - Jessie Frazelle
PPT
Don’t turn your logs into cuneiform
PDF
nix-processmgmt: An experimental Nix-based process manager-agnostic framework
PDF
Node js quick tour v2
PDF
Heroku Dockerの使い所
PPTX
Practical Glusto Example
DOCX
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
PDF
Building the Enterprise infrastructure with PostgreSQL as the basis for stori...
PPTX
Object Storage in a Cloud-Native Container Envirnoment
PDF
PDF
Understand the iptables step by step
DOCX
DockerCoreNet
PDF
Bootstrapping Microservices
PPTX
what is docker
HTML5 Programming
Boosting I/O Performance with KVM io_uring
Caching in Docker - the hardest thing in computer science
Docker Insight
Jan Čurn: Meteor: the full-stack JavaScript framework
Security in a containerized world - Jessie Frazelle
Don’t turn your logs into cuneiform
nix-processmgmt: An experimental Nix-based process manager-agnostic framework
Node js quick tour v2
Heroku Dockerの使い所
Practical Glusto Example
Bsdtw17: mariusz zaborski: case studies of sandboxing base system with capsicum
Building the Enterprise infrastructure with PostgreSQL as the basis for stori...
Object Storage in a Cloud-Native Container Envirnoment
Understand the iptables step by step
DockerCoreNet
Bootstrapping Microservices
what is docker
Ad

Similar to Packaging Services with Nix (20)

PDF
The Nix project
PDF
Automating Mendix application deployments with Nix
PDF
Functional Operations (Functional Programming at Comcast Labs Connect)
PDF
The Nix project
PDF
Deploying NPM packages with the Nix package manager
PDF
Making your app soar without a container manifest
PDF
Using NixOS for declarative deployment and testing
PDF
From Zero To Production (NixOS, Erlang) @ Erlang Factory SF 2016
PDF
nix-on-leap-osc22.pdf
PDF
From Zero to Application Delivery with NixOS
PPTX
Java applications containerized and deployed
PDF
Deploying .NET applications with the Nix package manager
PDF
Develop and Deploy Cloud-Native Apps as Resilient Microservice Architectures
PDF
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
PPTX
REPORT_ppt
PDF
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
PDF
Atomic Upgrading of Distributed Systems
PDF
Plone Hosting: A Panel Discussion
PDF
Buildpacks: the other way to build container images
PPTX
SwissJUG_Bringing the cloud back down to earth.pptx
The Nix project
Automating Mendix application deployments with Nix
Functional Operations (Functional Programming at Comcast Labs Connect)
The Nix project
Deploying NPM packages with the Nix package manager
Making your app soar without a container manifest
Using NixOS for declarative deployment and testing
From Zero To Production (NixOS, Erlang) @ Erlang Factory SF 2016
nix-on-leap-osc22.pdf
From Zero to Application Delivery with NixOS
Java applications containerized and deployed
Deploying .NET applications with the Nix package manager
Develop and Deploy Cloud-Native Apps as Resilient Microservice Architectures
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
REPORT_ppt
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Atomic Upgrading of Distributed Systems
Plone Hosting: A Panel Discussion
Buildpacks: the other way to build container images
SwissJUG_Bringing the cloud back down to earth.pptx
Ad

More from Outlyer (20)

PPTX
Murat Karslioglu, VP Solutions @ OpenEBS - Containerized storage for containe...
PPTX
How & When to Feature Flag
PPTX
Why You Need to Stop Using "The" Staging Server
PPTX
How GitHub combined with CI empowers rapid product delivery at Credit Karma
PDF
Minimum Viable Docker: our journey towards orchestration
PDF
Ops is dead. long live ops.
PDF
The service mesh: resilient communication for microservice applications
PPTX
Microservices: Why We Did It (and should you?)
PPTX
Renan Dias: Using Alexa to deploy applications to Kubernetes
PDF
Alex Dias: how to build a docker monitoring solution
PPTX
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
PDF
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
PDF
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
PDF
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
PPTX
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
PPTX
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
PDF
Zero Downtime Postgres Upgrades
PDF
DOXLON November 2016: Facebook Engineering on cgroupv2
PDF
DOXLON November 2016 - ELK Stack and Beats
PDF
DOXLON November 2016 - Data Democratization Using Splunk
Murat Karslioglu, VP Solutions @ OpenEBS - Containerized storage for containe...
How & When to Feature Flag
Why You Need to Stop Using "The" Staging Server
How GitHub combined with CI empowers rapid product delivery at Credit Karma
Minimum Viable Docker: our journey towards orchestration
Ops is dead. long live ops.
The service mesh: resilient communication for microservice applications
Microservices: Why We Did It (and should you?)
Renan Dias: Using Alexa to deploy applications to Kubernetes
Alex Dias: how to build a docker monitoring solution
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Zero Downtime Postgres Upgrades
DOXLON November 2016: Facebook Engineering on cgroupv2
DOXLON November 2016 - ELK Stack and Beats
DOXLON November 2016 - Data Democratization Using Splunk

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
medical staffing services at VALiNTRY
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
top salesforce developer skills in 2025.pdf
PPT
Introduction Database Management System for Course Database
PDF
Nekopoi APK 2025 free lastest update
PDF
System and Network Administration Chapter 2
PPTX
Transform Your Business with a Software ERP System
PDF
System and Network Administraation Chapter 3
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
How Creative Agencies Leverage Project Management Software.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Online Work Permit System for Fast Permit Processing
Softaken Excel to vCard Converter Software.pdf
medical staffing services at VALiNTRY
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
top salesforce developer skills in 2025.pdf
Introduction Database Management System for Course Database
Nekopoi APK 2025 free lastest update
System and Network Administration Chapter 2
Transform Your Business with a Software ERP System
System and Network Administraation Chapter 3
Wondershare Filmora 15 Crack With Activation Key [2025
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Which alternative to Crystal Reports is best for small or large businesses.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises

Packaging Services with Nix

Editor's Notes

  • #3: Nixpkgs maintainer Quit my job to do Nix consulting
  • #4: One package manager per language? Integration tests Why U no docker?
  • #5: Reproducible builds Content addressable
  • #6: Composable, creates a tree
  • #9: A worked example
  • #18: Layers vs trees