unpacking 'github:NixOS/nixos-hardware/def1d472c832d77885f174089b0d34854b007198' into the Git cache... unpacking 'github:NixOS/nixpkgs/1807c2b91223227ad5599d7067a61665c52d1295' into the Git cache... unpacking 'github:NixOS/nixpkgs/2b37ecedbb948e7607307c56e35aea5155eb65a7' into the Git cache... unpacking 'github:NixOS/nixpkgs/93ff48c9be84a76319dac293733df09bbbe3f25c' into the Git cache... • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/e8516a23524cc9083f5a02a8d64d14770e4c7c09?narHash=sha256-04xesW7HITdF5WUmNM39WD4tkEERk3Ez2W1nNvdIvIw%3D' (2024-12-22) → 'github:NixOS/nixos-hardware/def1d472c832d77885f174089b0d34854b007198?narHash=sha256-QIhd8/0x30gEv8XEE1iAnrdMlKuQ0EzthfDR7Hwl%2Bfk%3D' (2024-12-23) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/1c6e20d41d6a9c1d737945962160e8571df55daa?narHash=sha256-GIMyMt1pkkoXdCq9un859bX6YQZ/iYtukb9R5luazLM%3D' (2024-12-20) → 'github:NixOS/nixpkgs/1807c2b91223227ad5599d7067a61665c52d1295?narHash=sha256-Pzyb%2BYNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY%3D' (2024-12-22) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/f65ed2bc338695b200261832d397f975d672bd27?narHash=sha256-k7sv9jTrRVbL5ka4OK7VMCdTIFed7EFeoDCrJ7zjtKU%3D' (2024-12-22) → 'github:NixOS/nixpkgs/2b37ecedbb948e7607307c56e35aea5155eb65a7?narHash=sha256-E9JOCwppN3WX9oh6kV9w4nkN%2B6UPGNdzljscdJy5kTs%3D' (2024-12-23) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee?narHash=sha256-kMBQ5PRiFLagltK0sH%2B08aiNt3zGERC2297iB6vrvlU%3D' (2024-12-17) → 'github:NixOS/nixpkgs/93ff48c9be84a76319dac293733df09bbbe3f25c?narHash=sha256-Q%2BCB1ajsJg4Z9HGHTBAGY1q18KpnnkmF/eCTLUY6FQ0%3D' (2024-12-22)
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.