This repository contains various Nix flake templates. Here are some general guidelines for working with them:
- Enter Development Shell:
nix develop - Build Project:
nix build(ornix build .#<template-name>for a specific template's default package, ornix build .#<template-name>:exe:<executable-name>for a specific executable) - Run Project:
nix run(ornix run .#<template-name>for a specific template's default package, ornix run .#<template-name>:exe:<executable-name>for a specific executable) - Run a Single Test: This varies by template. You'll need to consult the specific
flake.nixor project's documentation. For JavaScript-based templates (likepix-ctl-full), checkpackage.jsonfor test scripts (e.g.,npm test).
Due to the polyglot nature of this repository, specific code style guidelines vary by language and template. However, general best practices apply:
- Readability: Write clear, concise, and self-documenting code.
- Consistency: Follow existing patterns and conventions within each template.
- Naming Conventions: Use descriptive names for variables, functions, and modules.
- Error Handling: Implement robust error handling mechanisms.
- Imports: Organize imports logically, typically at the top of the file.
- Always check the
flake.nixandpackage.json(if present) within each template's directory for specific build, lint, and test commands. - Look for
.cursor/rules/,.cursorrules, or.github/copilot-instructions.mdfor AI-specific guidelines if they exist in a given project.