unpacking 'github:lnl7/nix-darwin/ba9b3173b0f642ada42b78fb9dfc37ca82266f6c' into the Git cache... unpacking 'github:ghostty-org/ghostty/7a27af8bfce9007e31be10aeafe7a968a66aa0b5' into the Git cache... unpacking 'github:NixOS/nixpkgs/d86ae899d2909c0899e4d3b29d90d5309771e77c' into the Git cache... • Updated input 'darwin': 'github:lnl7/nix-darwin/a464e5ba8cfb10a81599dbd422f30f5d37997916?narHash=sha256-anoVvML2D%2BnLfHlBfhEcCMjTou/9SRrrlqQN%2BUg39ws%3D' (2025-01-04) → 'github:lnl7/nix-darwin/ba9b3173b0f642ada42b78fb9dfc37ca82266f6c?narHash=sha256-bTl9fcUo767VaSx4Q5kFhwiDpFQhBKna7lNbGsqCQiA%3D' (2025-01-05) • Updated input 'ghostty': 'github:ghostty-org/ghostty/0306c592a7dbaa394da481ab2219b3bcd2b8b48f?narHash=sha256-jKWHpdlWyN8fa/1MvSRX2qVf%2BZBJLu8NsH7T9xK4WRo%3D' (2025-01-04) → 'github:ghostty-org/ghostty/7a27af8bfce9007e31be10aeafe7a968a66aa0b5?narHash=sha256-VTKk01nq122E0YuDcTS7tWFBlfOjnZQteHJkPU5F370%3D' (2025-01-05) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/b00f0047f0c691d17e515004c03f7ea8fc4c2096?narHash=sha256-GrbPeyG8jkxT0q81rPis3DipB0mN7oPiEFy17Qki3hs%3D' (2025-01-05) → 'github:NixOS/nixpkgs/d86ae899d2909c0899e4d3b29d90d5309771e77c?narHash=sha256-6SrMWqWSmPJaXtg2RD793HcBvTe0wfVPx60WzIl7SEA%3D' (2025-01-05)
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.