unpacking 'github:lnl7/nix-darwin/6ace2f2d12bdf74235d5cbf9fbd34a71c9716685' into the Git cache... unpacking 'github:ghostty-org/ghostty/a2445359c40ba66f36157359c0ae92509b7f005d' into the Git cache... unpacking 'github:NixOS/nixos-hardware/8870dcaff63dfc6647fb10648b827e9d40b0a337' into the Git cache... unpacking 'github:NixOS/nixpkgs/1dab772dd4a68a7bba5d9460685547ff8e17d899' into the Git cache... unpacking 'github:NixOS/nixpkgs/bc5c5a9d2cf93b8b46222e63c39bb68b79ede690' into the Git cache... unpacking 'github:NixOS/nixpkgs/2f9e2f85cb14a46410a1399aa9ea7ecf433e422e' into the Git cache... unpacking 'github:nix-community/nixvim/2004ff4547f11d25da78f393fe797dde2b831ce7' into the Git cache... • Updated input 'darwin': 'github:lnl7/nix-darwin/57733bd1dc81900e13438e5b4439239f1b29db0e?narHash=sha256-iWcjToBpx4PUd74uqvIGAfqqVfyrvRLRauC/SxEKIF0%3D' (2025-01-08) → 'github:lnl7/nix-darwin/6ace2f2d12bdf74235d5cbf9fbd34a71c9716685?narHash=sha256-mG9lRZBcPiAGiVJ9B97BJoIGQcSBWIVlBiN30QYCtG0%3D' (2025-01-11) • Updated input 'ghostty': 'github:ghostty-org/ghostty/918ccdba5cc65ccd1fb48a54c71306d869299441?narHash=sha256-r%2BFXWU/hfgO3lAHYs9Q03iCShnC42mZd1pnmIIp8Z9k%3D' (2025-01-11) → 'github:ghostty-org/ghostty/a2445359c40ba66f36157359c0ae92509b7f005d?narHash=sha256-JGvxWgyrZqo86/8LMJbiu/MlB0I%2BrEzlP%2BKcp1QMpbY%3D' (2025-01-12) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/3f0a8ac25fb674611b98089ca3a5dd6480175751?narHash=sha256-JO%2BlFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I%3D' (2025-01-06) → 'github:NixOS/nixpkgs/1dab772dd4a68a7bba5d9460685547ff8e17d899?narHash=sha256-ibkQrMHxF/7TqAYcQE%2BtOnIsSEzXmMegzyBWza6uHKM%3D' (2025-01-10) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/c3c9b284ca97b041c96a19844c305bac06c8b5d8?narHash=sha256-ua1c8eqrTDSICU/9d/BuRuJRPatViSXDRO/70zC3Ghs%3D' (2025-01-11) → 'github:NixOS/nixpkgs/bc5c5a9d2cf93b8b46222e63c39bb68b79ede690?narHash=sha256-%2BgH2L0T45T0I4EVavANTJTWA6eXqOiDnkIyr6tHIf8U%3D' (2025-01-12) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/32af3611f6f05655ca166a0b1f47b57c762b5192?narHash=sha256-dMGNa5UwdtowEqQac%2BDr0d2tFO/60ckVgdhZU9q2E2o%3D' (2025-01-09) → 'github:NixOS/nixpkgs/2f9e2f85cb14a46410a1399aa9ea7ecf433e422e?narHash=sha256-FWlPMUzp0lkQBdhKlPqtQdqmp%2B/C%2B1MBiEytaYfrCTY%3D' (2025-01-12)
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.