Copyright (c) 2025 wold9168
This project includes a .gitignore file from github/gitignore and two CMakeLists.txt files with commonly used features, making it easier to build modular and extensible projects based on this template.
Run init.sh to bootstrap your development environment if just and direnv are not installed. The script will install them via nix profile, but requires nix to already be installed on your system.
nixtrash-cli
To add more libraries, please follow the standard procedure below:
- Add the libraries you need in
flake.nix. - Add the library names (e.g.,
imtui) totarget_link_librariesin theCMakeLists.txtfile of the corresponding module. - Run
nix flake checkto trigger an update of the Nix environment variables. - If necessary, restart your editor (especially the corresponding
clangdprocess) so that it picks up the new environment variables.- Users of VSCode/VSCodium can use the extension mkhl.direnv to restart extension host with latest environment variables. If the environment variables haven't been updated automatically1 after saving
flake.nix, you can rundirenv reloadto toggle it manually.
- Users of VSCode/VSCodium can use the extension mkhl.direnv to restart extension host with latest environment variables. If the environment variables haven't been updated automatically1 after saving
MIT License
Footnotes
-
Set
"direnv.restart.automatic": truefor mkhl.direnv. ↩