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
yawnt
June 01, 2016
Programming
1.8k
0
Share
NixOS - Purely Functional Package Management
yawnt
June 01, 2016
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
240
Other Decks in Programming
See All in Programming
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
530
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
110
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
230
AWSはOSSをどのように 考えているのか?
akihisaikeda
1
140
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.6k
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
710
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
360
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.9k
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
210
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
470
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
570
inferと仲良くなる10分間
ryokatsuse
1
240
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
Navigating Weather and Climate Data
rabernat
0
200
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
190
Design in an AI World
tapps
1
210
The browser strikes back
jonoalderson
0
1.1k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
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?