NixOS workstation
My laptop as a Nix flake. NixOS and Home Manager modules for an AMD machine, sops-nix secrets, a Nixvim editor and a hardened kernel configuration.
- Status
- Paused
- Area
- Linux and systems
- Timeline
- Feb 2025 – May 2026
- Stack
- Nix, NixOS, Home Manager, sops-nix, Nixvim
Everything on the machine, from the bootloader to the shell prompt, is declared in one flake. Rebuilding produces the same system every time, and a bad change is one rollback away.
What it includes
- System modules split by concern: hardware (AMD, power, firmware, swap), kernel (parameters, sysctl, polkit), networking (NetworkManager, nftables, firewalld, OpenSSH) and services (Podman, libvirt, Ollama).
- Home Manager modules for more than 20 tools, including zsh, tmux, Ghostty, Kitty, Git with delta, fzf, ripgrep and a Nixvim configuration.
- Secrets encrypted with sops and age, decrypted at activation by sops-nix.
- A development shell with alejandra, deadnix and statix for formatting and linting, plus a CI job that checks the health of
flake.lock.
What I'd change
The kernel module sets a page of hardening sysctls and then boots with mitigations=off, which reopens the side channels those settings guard against. I'd turn mitigations back on and measure the cost before deciding.
Notes
- Hardening a NixOS desktop with sysctl: which kernel settings the flake changes, and what each one costs.