Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
NixOS - Purely Functional Package Management
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yawnt
June 01, 2016
Programming
0
1.8k
NixOS - Purely Functional Package Management
yawnt
June 01, 2016
Tweet
Share
More Decks by yawnt
See All by yawnt
Fun with Elixir and the Erlang VM
yawnt
2
260
Open Source as A Service
yawnt
0
230
Other Decks in Programming
See All in Programming
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
430
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
640
Apache Iceberg V3 and migration to V3
tomtanaka
0
130
Data-Centric Kaggle
isax1015
2
750
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
0
130
Fragmented Architectures
denyspoltorak
0
140
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
720
高速開発のためのコード整理術
sutetotanuki
1
370
Patterns of Patterns
denyspoltorak
0
1.3k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
370
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
110
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
89
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
120
We Are The Robots
honzajavorek
0
150
Statistics for Hackers
jakevdp
799
230k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Writing Fast Ruby
sferik
630
62k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
440
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Transcript
Nix(OS) purely functional package management Fueled by
f(x)
Why is state evil?
Expensive to keep track of mutation
Which in turns means no rollback
Which in turns means no portability
The Nix language
Why?
$ nix-repl > true true > 1 + 1 2
> (a: a + 1) 1 2
We use Nix to describe how to build packages
{ stdenv, fetchurl, perl }: stdenv.mkDerivation { name = "hello-2.1.1";
builder = ./builder.sh; src = fetchurl { url = “${packageURL}; md5 = “${md5hash}; }; inherit perl; }
Packages are immutable once built
Everything lives inside a single directory, the store
“Live” packages are symlinked
Old packages are still in the store, just not accessible
Rollback for free
Multiple versions for free
Multiple envs for free
Puppies for free
Ok, maybe not puppies
$ nix-repl command not found: nix-repl $ nix-shell -p nix-repl
[nix-shell:~]$ nix-repl -v nix-repl v1.1.2 [nix-shell:~]$ exit $ nix-repl command not found: nix-repl
NixOS is a distribution built around Nix
In Nix, to build a package you write a function
In NixOS, to build a system you write a function
configuration.nix
$ fdisk /dev/sda $ mkfs.ext4 -L nixos /dev/sda1 $ mkswap
-L swap /dev/sda2 $ swapon /dev/sda2 $ mount /dev/disk/by-label/nixos /mnt $ nixos-generate-config --root /mnt $ nano /mnt/etc/nixos/configuration.nix $ nixos-install $ reboot
{ config, pkgs, ... }: { imports = [ ./hardware-configuration.nix
]; boot.loader.grub.device = "/dev/sda"; }
Building your system is purely functional
Upgrading is the same as rebuilding from scratch
No /usr, /sbin/, /share
Just /nix/store
Nix(OS) cryoptographically hashes all build inputs
That means built-in versioning
dotfiles, just store ‘em in /nix/store .emacs.d, *wink* *wink* ;)
;)
More than just a distribution
nixops
(hail) hydra
Questions?