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
240
Other Decks in Programming
See All in Programming
Windows on Ryzen and I
seosoft
0
340
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
150
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
150
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
390
AHC061解説
shun_pi
0
410
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
350
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
190
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2k
PHPで TLSのプロトコルを実装してみる
higaki_program
0
360
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
240
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
450
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
880
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
82
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
sira's awesome portfolio website redesign presentation
elsirapls
0
200
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
Making the Leap to Tech Lead
cromwellryan
135
9.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
52k
The SEO identity crisis: Don't let AI make you average
varn
0
420
Amusing Abliteration
ianozsvald
0
140
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?