unpacking 'github:lnl7/nix-darwin/57733bd1dc81900e13438e5b4439239f1b29db0e' into the Git cache... unpacking 'github:ghostty-org/ghostty/12ce9f2e3b19cf1810746dcfe5b19f173004e256' into the Git cache... unpacking 'github:nix-community/home-manager/bd65bc3cde04c16755955630b344bc9e35272c56' into the Git cache... unpacking 'github:NixOS/nixos-hardware/4f339f6be2b61662f957c2ee9eda0fa597d8a6d6' into the Git cache... unpacking 'github:NixOS/nixpkgs/c30dc6d36c14f2febe70f32f138e76094e077b66' into the Git cache... unpacking 'github:NixOS/nixpkgs/8c9fd3e564728e90829ee7dbac6edc972971cd0f' into the Git cache... unpacking 'github:danth/stylix/c62df1918d178ade64dc8a2df99e78a5d5f20514' into the Git cache... • Updated input 'ghostty': 'github:ghostty-org/ghostty/eb40cce45e6593a4065a32681d27c75c4ca3a9c9?narHash=sha256-iCb3%2BKniUL0Ic1AUkaM3CpO2UGNW6CQSigVzuVUQ8T0%3D' (2025-01-08) → 'github:ghostty-org/ghostty/12ce9f2e3b19cf1810746dcfe5b19f173004e256?narHash=sha256-9UHWb2T2VJRYN%2B72yEFjXgJcuFZqKQSHggj6oy9tzJs%3D' (2025-01-09) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/8e97141d59b87e2bf254cd0920be29955d45a698?narHash=sha256-h0hPzFp7iVhCqzBx%2BkJGdO/KmG8AkYRJ0jKxQ6%2Bdiug%3D' (2025-01-09) → 'github:NixOS/nixpkgs/c30dc6d36c14f2febe70f32f138e76094e077b66?narHash=sha256-ApMzJACM3M0kdBorJpZSgTk7IkJzbYFZwG0xQv/T3BQ%3D' (2025-01-09)
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.