unpacking 'github:NixOS/nixpkgs/dfa986cbcf5e4658b909fe3a79a4f22bb2c567cc' into the Git cache... • Updated input 'home-manager': 'github:nix-community/home-manager/0948aeedc296f964140d9429223c7e4a0702a1ff?narHash=sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ%3D' (2025-03-22) → 'github:nix-community/home-manager/15c5f9d04fabd176f30286c8f52bbdb2c853a146?narHash=sha256-24N3NAuZZbYqZ39NgToZgHUw6M7xHrtrAm18kv0%2B2Wo%3D' (2025-03-31) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c570c1f5304493cafe133b8d843c7c1c4a10d3a6?narHash=sha256-tpJsHMUPEhEnzySoQxx7%2BkA%2BKUtgWqvlcUBqROYNNt0%3D' (2025-03-29) → 'github:NixOS/nixpkgs/02f2af8c8a8c3b2c05028936a1e84daefa1171d4?narHash=sha256-7PCBQ4aGVF8OrzMkzqtYSKyoQuU2jtpPi4lmABpe5X4%3D' (2025-04-01) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/c68937a0a0008af9117305874bd3da814fac1f19?narHash=sha256-8PahEFvafZ7SAQcAmncDyslOcSlSIkyANk9b/XXQ60k%3D' (2025-03-30) → 'github:NixOS/nixpkgs/dfa986cbcf5e4658b909fe3a79a4f22bb2c567cc?narHash=sha256-2wHSj66NKAK4cj43iEL6Z/Pwz4p8AFxIx5PuEtBJe4I%3D' (2025-04-02) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/eb0e0f21f15c559d2ac7633dc81d079d1caf5f5f?narHash=sha256-ArWLUgRm1tKHiqlhnymyVqi5kLNCK5ghvm06mfCl4QY%3D' (2025-03-29) → 'github:NixOS/nixpkgs/b9d43b3fe5152d1dc5783a2ba865b2a03388b741?narHash=sha256-Bl/ynRPIb4CdtbEw3gfJYpKiHmRmrKltXc8zipqpO0o%3D' (2025-04-01)
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.