unpacking 'github:lnl7/nix-darwin/c172f50b55b087f8e7801631de977461603bb976' into the Git cache... unpacking 'github:NixOS/nixpkgs/48913d8f9127ea6530a2a2f1bd4daa1b8685d8a3' into the Git cache... unpacking 'github:NixOS/nixpkgs/07fa717fa18f59aee61213c40ccc38e33f78b7d7' into the Git cache... unpacking 'github:NixOS/nixpkgs/02032da4af073d0f6110540c8677f16d4be0117f' into the Git cache... • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/6af28b834daca767a7ef99f8a7defa957d0ade6f?narHash=sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4%2Bfai1Sk%3D' (2025-03-04) → 'github:NixOS/nixpkgs/48913d8f9127ea6530a2a2f1bd4daa1b8685d8a3?narHash=sha256-0Sj6ZKjCpQMfWnN0NURqRCQn2ob7YtXTAOTwCuz7fkA%3D' (2025-03-05) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/ce62a1161fb338860874468db35cd3e05a6b51eb?narHash=sha256-98QUJA8jyJFc80ArcEnSX0prwFkQzyn0zK0kGjwODtY%3D' (2025-03-06) → 'github:NixOS/nixpkgs/07fa717fa18f59aee61213c40ccc38e33f78b7d7?narHash=sha256-z0a3Kq7KrcW/FjtZrCp0KUozvM5z5xJnZRwkLuTLPBE%3D' (2025-03-07)
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.