Nix on Linux — Fedora bridge path
Nix on Linux — Fedora bridge path
This part is the on-ramp: run the full Nix package manager on a normal Linux distribution—especially Fedora 44+, which now ships Nix officially—so you learn store, flakes, profiles, Home Manager, and project shells without replacing your OS yet.
When you later install NixOS, almost nothing you practice here is wasted. You already speak store paths, locks, nix develop, GC roots, and declarative user config. NixOS then “only” adds: module system for the machine, generations for the bootloader, and system-wide rebuilds.
Who this part is for
- Daily driver is Fedora 44 (or nearby: F43+, EPEL packaging where available)
- You want Nix skills before a full distro switch
- You already finished (or skimmed) Concepts (
01-concepts/)
- You are not ready to wipe the host for NixOS this week
If you only have a spare disk/VM and want the OS immediately, you can jump to NixOS host—but this bridge still pays off for multi-machine workflows (Fedora laptop + NixOS server is a common end state).
Why Fedora 44 matters
Historically, Nix on Fedora meant the upstream multi-user installer, SELinux friction, and awkward ownership of /nix.
Fedora Change: Nix package tool (feature for Fedora 44) plus approval of /nix for the distro package changed that:
| Before (typical) | Fedora 44+ packaged path |
|---|---|
curl \| sh Determinate/upstream installer |
sudo dnf install nix |
| Manual SELinux babysitting | Policy-integrated Fedora build |
| Flakes often left experimental | Flakes enabled out of the box (Fedora packaging) |
| Atomic desktops painful | Documented rootless / bind-mount patterns |
Upstream discourse and Fedora packaging notes also describe nix-daemon multi-user, single-user, and pure rootless modes (especially useful on Atomic/bootc-style systems). Always confirm with /usr/share/doc/nix/README.fedora.md on your machine—Fedora packaging details evolve faster than this notebook.
Baseline for this book still applies: treat Nix 2.34-class tooling and nixpkgs 26.05 pins as the comparison point when you write flakes.
What you will learn here
| Chapter | You leave able to… |
|---|---|
| Why Nix on Linux | Map package manager vs OS; design a dual-stack life (dnf + Nix) |
| Fedora 44 install | Install daemon or single-user; verify; read Fedora docs on disk |
| Store, profiles, GC | Own profiles without snowflaking; GC safely; see roots |
| CLI + devShells | Daily nix build/run/develop/shell; flake projects; direnv |
| Home Manager standalone | Declarative user environment on Fedora |
| dnf + Nix coexistence | Decide what belongs where; avoid PATH wars |
| SELinux, Atomic, ops | Survive enforcing SELinux; Atomic /nix bind; disk ops |
| Bridge to NixOS | Port habits into first nixosConfigurations host |
Suggested study path
Concepts (store, language, flakes)
│
▼
┌───────────────────────────────┐
│ Nix on Linux (you are here: │
│ Fedora daily driver) │
└───────────────┬───────────────┘
│ same flake skills
▼
NixOS host (machine as code)
│
▼
Home Manager as NixOS module
(you already know standalone HM)
| Path | Order |
|---|---|
| Recommended | Concepts → this part → NixOS host → Home layout part (skim what you already know) |
| Already installed Nix via curl | Start at install chapter for Fedora packaging migration, then continue |
| Atomic desktop only | Install + SELinux/Atomic chapter early |
Lab workspace
mkdir -p ~/lab/nixos-book/nix-on-linux
cd ~/lab/nixos-book/nix-on-linux
git init # optional but recommendedKeep experiments outside critical personal data. The store under /nix will grow—budget 20–50+ GB if you build many shells.
Exit gate (before NixOS host)
nix --versionworks after reboot
- Multi-user or intentional single-user/rootless mode documented in your notes
- Flakes work:
nix flake metadata nixpkgs(or a personal flake)
- You can enter a project
devShelland have teammates reproduce it viaflake.lock
- You understand profile vs devShell vs system packages (NixOS later)
- Home Manager standalone rebuild succeeds for at least shell + git + editor snippet
- You can explain what moves to NixOS later (modules, generations, boot) without panic
Further depth (this book)
| Next | Part |
|---|---|
| Install and own a machine | 03-nixos-host/ |
| Flake layout + HM as system module | 04-home-and-flake-layout/ |
| Packaging craft | 06-packaging/ |
| ROS 2 robotics env (overlay + flakes) | ROS 2 with nix-ros-overlay |
Official docs win when notes disagree: nix.dev, NixOS manual, Fedora /usr/share/doc/nix/, Fedora Nix Change.