unpacking 'github:NixOS/nixpkgs/7105ae3957700a9646cc4b766f5815b23ed0c682' into the Git cache... unpacking 'github:NixOS/nixpkgs/0740f6f238767d4caf9afe774d3e88105766dfc6' into the Git cache... unpacking 'github:NixOS/nixpkgs/bfa9810ff7104a17555ab68ebdeafb6705f129b1' into the Git cache... • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/da044451c6a70518db5b730fe277b70f494188f1?narHash=sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic%3D' (2025-03-18) → 'github:NixOS/nixpkgs/7105ae3957700a9646cc4b766f5815b23ed0c682?narHash=sha256-8XfURTDxOm6%2B33swQJu/hx6xw1Tznl8vJJN5HwVqckg%3D' (2025-03-20) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/7296c7ff9a434792907cfcd30b3d48ea5744029f?narHash=sha256-z7coQP4OcezfC5R12R3SCpi7zSc4nR3VHFNBXCV5pvY%3D' (2025-03-18) → 'github:NixOS/nixpkgs/0740f6f238767d4caf9afe774d3e88105766dfc6?narHash=sha256-NAxwF5cjgh8o5aylhePXWNQETCWYaTpNvdO2bMfINpQ%3D' (2025-03-22) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/9bc8a90931262245919a26f995c1f24c6c70d3fe?narHash=sha256-xlpHmgBxUnvHo8FNnju0sgnEyasb4gC607b%2BkeqjmX8%3D' (2025-03-17) → 'github:NixOS/nixpkgs/bfa9810ff7104a17555ab68ebdeafb6705f129b1?narHash=sha256-QyhimDBaDBtMfRc7kyL28vo%2BHTwXRPq3hz%2BBgSJDotw%3D' (2025-03-21)
nix-config
This repo stores nix to manage my machines running NixOS and macOS.
The configuration is very specific to my own machines and setup, but it may be a useful reference for anyone else learning or experimenting with nix, whether it be on a personal workstation or a server environment.
Setup
on macOS: install the latest unstable nix from https://github.com/numtide/nix-unstable-installer (for nix flakes), and nix-darwin: https://github.com/LnL7/nix-darwin
Recipes are stored in a justfile. just is required.
To run a rebuild:
just rebuild
Update
To update nixpkgs defined in flake.nix, run:
just update
If there are updates, they should be reflected in flake.lock.
Rollback
To rollback to the previous generation:
just rollback
Garbage collection
To cleanup previous files, run nix garbage collection:
just clean
Pre-commit hooks
Pre-commit hooks are automatically activated when direnv is installed.