An opinionated collection of modular presets and configurations for devenv.sh, designed to streamline development environment setup.
- Modular Architecture: Easily toggle specific configurations via a unified interface.
- Overridable Defaults: Most settings are defined as defaults that can be easily overridden. disabled if you need.
- Friendly Menu: Built-in menu with all installed tools.
- Best Practices: Standardized presets, formatting, linters and common development tools.
To use these recipes, add knopki-devenvs to your devenv.yaml and include the
knopki-devenvs/modules in your imports:
# devenv.yaml
inputs:
knopki-devenvs:
url: github:knopki/devenvs
flake: false
allowUnfree: true
imports:
- knopki-devenvs/modulesAfter updating the configuration, sync your lockfile:
devenv updateEnable the desired modules within your devenv.nix file. Below is an example
configuration for a Nix-based project:
# devenv.nix
{ inputs, pkgs, ... }: {
# Enable custom presets
knopki.nixos.enable = true;
# Enable an interactive CLI menu for the project
knopki.menu.enable = true;
# Disable something that is enabled by default (for example)
git-hooks.hooks.no-commit-to-branch.enable = false;
# Enable auto-formatting
treefmt.enable = true;
}Note that if you enable treefmt, you must explicitly add the treefmt-nix
input to your devenv.yaml as per the
official documentation: If you enable
git-hooks, you must explicitly add the git-hooks input.
# devenv.yaml
inputs:
git-hooks:
url: github:cachix/git-hooks.nix
treefmt-nix:
url: github:numtide/treefmt-nix
inputs:
nixpkgs:
follows: nixpkgs