• Updated input 'darwin': 'github:lnl7/nix-darwin/0bea8222f6e83247dd13b055d83e64bce02ee532' (2024-05-24) → 'github:lnl7/nix-darwin/c0d5b8c54d6828516c97f6be9f2d00c63a363df4' (2024-05-29) • Updated input 'darwin/nixpkgs': 'path:/nix/store/f6lbic2a83c51ygb2czksw9gv8x6w5wg-source?lastModified=1716633019&narHash=sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4%3D&rev=9d29cd266cebf80234c98dd0b87256b6be0af44e' (2024-05-25) → 'path:/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source?lastModified=1687274257&narHash=sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF%2B/SUBNnAOE%3D&rev=2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5' (2023-06-20) • Updated input 'home-manager/nixpkgs': 'github:NixOS/nixpkgs/9d29cd266cebf80234c98dd0b87256b6be0af44e' (2024-05-25) → 'github:NixOS/nixpkgs/b8dd8be3c790215716e7c12b247f45ca525867e2' (2024-01-15) • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/9a20e17a73b052d6be912adcee220cb483477094' (2024-05-27) → 'github:NixOS/nixos-hardware/8251761f93d6f5b91cee45ac09edb6e382641009' (2024-05-29) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/e2dd4e18cc1c7314e24154331bae07df76eb582f' (2024-05-26) → 'github:NixOS/nixpkgs/ac82a513e55582291805d6f09d35b6d8b60637a1' (2024-05-29) • Updated input 'nixvim/flake-utils': 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11) → 'github:numtide/flake-utils/4022d587cbbfd70fe950c1e2083a02621806a725' (2023-12-04) • Updated input 'nixvim/nixpkgs': 'github:NixOS/nixpkgs/9d29cd266cebf80234c98dd0b87256b6be0af44e' (2024-05-25) → 'github:NixOS/nixpkgs/32f63574c85fbc80e4ba1fbb932cde9619bad25e' (2023-12-31) • Updated input 'nixvim/pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/0e8fcc54b842ad8428c9e705cb5994eaf05c26a0' (2024-05-20) → 'github:cachix/pre-commit-hooks.nix/9d3d7e18c6bc4473d7520200d4ddab12f8402d38' (2023-12-30) • Updated input 'nixvim/pre-commit-hooks/flake-compat': 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33' (2023-10-04) → 'github:edolstra/flake-compat/35bb57c0c8d8b62bbfd284272c928ceb64ddbde9' (2023-01-17) • Added input 'nixvim/pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31) • Added input 'nixvim/pre-commit-hooks/flake-utils/systems': 'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09) • Updated input 'nixvim/pre-commit-hooks/gitignore': 'github:hercules-ci/gitignore.nix/637db329424fd7e46cf4185293b9cc8c88c95394' (2024-02-28) → 'github:hercules-ci/gitignore.nix/a20de23b925fd8264fd7fad6454652e142fd7f73' (2022-08-14) • Updated input 'nixvim/pre-commit-hooks/nixpkgs-stable': 'github:NixOS/nixpkgs/614b4613980a522ba49f0d194531beddbb7220d3' (2024-03-17) → 'github:NixOS/nixpkgs/c37ca420157f4abc31e26f436c1145f8951ff373' (2023-06-03) • Updated input 'stylix': 'github:danth/stylix/5234b3d467aa803ad8d3fe898ef5673246045984' (2024-05-28) → 'github:danth/stylix/3c8f033fd585835387a754160f47dab0c37ad5ae' (2024-05-21) • Added input 'stylix/base16-alacritty': 'github:aarowill/base16-alacritty/c95c200b3af739708455a03b5d185d3d2d263c6e' (2023-12-31) • Added input 'stylix/base16-alacritty-yaml': 'github:aarowill/base16-alacritty/63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7' (2023-01-21) • Removed input 'stylix/gnome-shell'
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.