← Back to Explore

NixOS on Framework

Reproducible development on repairable hardware

Why this combination

Framework builds laptops you can fix and upgrade. NixOS lets you define your entire system in code and rebuild it identically. Both prioritize user control over convenience. They pair well.

48GB RAM means running 22B parameter models locally. 2TB NVMe plus expansion storage means room for models, projects, and experiments. The modular expansion cards let you swap between USB, storage, or display outputs as needed.

The learning curve

NixOS is different. You don't install packages the normal way. You declare what you want, rebuild, and the system matches your declaration. Takes a while to stop reaching for apt/dnf/pacman.

Start with the NixOS manual and Nix Pills. Install in a VM first, then old hardware, then your daily driver. The paradigm shift from "run commands to change state" to "declare desired state" is the hard part.

Flakes for reproducibility

Flakes lock your dependencies. Your system tomorrow builds the same as today.

# flake.nix
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: {
nixosConfigurations.framework = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hardware-configuration.nix
./configuration.nix
];
};
};
}

Break config into modules as it grows: terminal.nix, development.nix, ai-tools.nix. Each module handles one thing.

Framework hardware config

# Hardware-specific bits
boot.kernelPackages = pkgs.linuxPackages_latest;
services.thermald.enable = true;
services.auto-cpufreq.enable = true;
hardware.bluetooth.enable = true;
services.pipewire.enable = true;

Framework has good NixOS community support. The wiki and forums have hardware-specific configurations for most modules.

Local AI setup

# modules/ai-tools.nix
{ pkgs, ... }: {
services.ollama = {
enable = true;
acceleration = "cpu";
};
environment.systemPackages = with pkgs; [
aider-chat python3Full
];
}

Ollama as a system service. Models in /var/lib/ollama. Works with aider for AI pair programming, or anything that talks to local endpoints.

What I actually use

Zellij for terminal multiplexing. Neovim with LSP. Ripgrep, fd, fzf, bat. Go and Python for most projects. Git for everything.

The whole setup rebuilds from a git repo. If hardware dies tomorrow, new machine is identical within an hour of install.

Related

Linux distro selection → What I've built →