• Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/5629520edecb69630a3f4d17d3d33fc96c13f6fe' (2024-08-31) → 'github:NixOS/nixpkgs/b833ff01a0d694b910daca6e2ff4a3f26dee478c' (2024-09-01) • Updated input 'nixvim': 'github:nix-community/nixvim/7cae6d0202140ec322e18b65b63d03b423d595f7' (2024-08-31) → 'github:nix-community/nixvim/0ddf66249ff563cd09134196cae53f14ce869868' (2024-09-02) • Updated input 'nixvim/flake-parts': 'github:hercules-ci/flake-parts/af510d4a62d071ea13925ce41c95e3dec816c01d' (2024-08-30) → 'github:hercules-ci/flake-parts/567b938d64d4b4112ee253b9274472dc3a346eb6' (2024-09-01) • Updated input 'nixvim/nix-darwin': 'github:lnl7/nix-darwin/c8d3157d1f768e382de5526bb38e74d2245cad04' (2024-08-30) → 'github:lnl7/nix-darwin/7c4b53a7d9f3a3df902b3fddf2ae245ef20ebcda' (2024-09-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.