unpacking 'github:NixOS/nixos-hardware/cf737e2eba82b603f54f71b10cb8fd09d22ce3f5' into the Git cache... unpacking 'github:NixOS/nixpkgs/9409e7eb50e79dda54ed26b9964e56ef2d6138c9' into the Git cache... unpacking 'github:NixOS/nixpkgs/bc27f0fde01ce4e1bfec1ab122d72b7380278e68' into the Git cache... unpacking 'github:nix-community/nixvim/b752606681ded3f69e99ed568c7075b3578dce48' into the Git cache... unpacking 'github:danth/stylix/bc25f3d69d3bb54548b772d7c2771e65cc37dc10' into the Git cache... • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/e563803af3526852b6b1d77107a81908c66a9fcf?narHash=sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is%3D' (2024-12-06) → 'github:NixOS/nixos-hardware/cf737e2eba82b603f54f71b10cb8fd09d22ce3f5?narHash=sha256-%2BjjPup/ByS0LEVIrBbt7FnGugJgLeG9oc%2BivFASYn2U%3D' (2024-12-10) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/314edfd2d5dcca142d4e1bec52e96623120ee9ab?narHash=sha256-Y0u0rbRFhw16HcN8YOc7myJmBZyzgo5ZwBRqbtZK2Fw%3D' (2024-12-09) → 'github:NixOS/nixpkgs/9409e7eb50e79dda54ed26b9964e56ef2d6138c9?narHash=sha256-gbUySWIwT45Yi52X7b3hUM9TcWjmlA9Tp/w0z%2BcfA4w%3D' (2024-12-11) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/93dc9803a1ee435e590b02cde9589038d5cc3a4e?narHash=sha256-w0FXPfpGhOihoJDiwMsyN1EzpsXi2F8VQ%2BNVZQSMtys%3D' (2024-12-08) → 'github:NixOS/nixpkgs/bc27f0fde01ce4e1bfec1ab122d72b7380278e68?narHash=sha256-%2B5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs%3D' (2024-12-09) • Updated input 'nixvim': 'github:nix-community/nixvim/cf7e026c8c86c5548d270e20c04f456939591219?narHash=sha256-SCEjUwyt6R2%2B36BS7xQG%2BrHUrhE8HDpmRwQzKHJkimQ%3D' (2024-12-09) → 'github:nix-community/nixvim/b752606681ded3f69e99ed568c7075b3578dce48?narHash=sha256-VHzWuZYK/m5OFXzAczrjnI7vH6knj0sfLnziRVDqgFE%3D' (2024-12-10) • Updated input 'stylix': 'github:danth/stylix/e309d64fe7f203274a7913e1d2b74307d15ba122?narHash=sha256-RH/8yIuo%2BfNLCjQ6e1mnXwmmxymjvfWC9JcbDuIA8TM%3D' (2024-12-06) → 'github:danth/stylix/bc25f3d69d3bb54548b772d7c2771e65cc37dc10?narHash=sha256-PMZdRUZQlouWgHFCFW8ANDFL6fUjZ67KAEaqRXwRwvc%3D' (2024-12-10)
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.