From 19bc309b8b1ccc37a9ce2a294e9b409ed2184953 Mon Sep 17 00:00:00 2001 From: moons Date: Mon, 27 Jul 2026 06:18:24 +0900 Subject: [PATCH] add document --- AGENTS.md | 28 ++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 AGENTS.md create mode 100644 README.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..478f1b5 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,28 @@ +# Repository Guidelines + +## Project Structure & Module Organization + +This repository manages NixOS and Home Manager configuration as a flake. `flake.nix` defines inputs and imports the project modules. Keep flake-level plumbing in `flake/`, reusable package overlays in `overlays/`, and development environments in `shells/`. Add configuration under the appropriate `modules/` category: `applications/`, `hardwares/`, `profiles/`, `services/`, `systems/`, or `users/`. Keep host- or user-specific choices near their owning module rather than in the root flake. + +## Build, Test, and Development Commands + +- `nix develop .#dotnix` enters the main development shell and installs the repository's pre-commit hooks. +- `nix develop .#android` provides Android platform tools such as `adb` and `fastboot`. +- `nix fmt` formats all supported files through treefmt. +- `nix flake check` evaluates flake outputs and runs configured checks. +- `pre-commit run --all-files` runs formatting, dead-code and static Nix checks, shell linting, and secret scanning. +- `nix flake update` refreshes pinned inputs in `flake.lock`; review lockfile changes before committing. + +If direnv is installed, `direnv allow` activates the `dotnix` shell from `.envrc` automatically. + +## Coding Style & Naming Conventions + +Use two-space indentation in Nix files and let `nixfmt` decide layout. Prefer small modules with explicit imports and descriptive kebab-case filenames, for example `modules/services/media-server.nix`. Use camelCase for Nix attributes unless an upstream option dictates otherwise. Shell snippets must pass `shfmt` and `shellcheck`; YAML, TOML, and Markdown are formatted by the configured treefmt tools. + +## Testing Guidelines + +There is no separate unit-test suite. Before submitting changes, run `nix flake check` and `pre-commit run --all-files`. For system-specific changes, also build or evaluate the affected NixOS/Home Manager configuration without switching the live machine. Never commit generated secrets, `.age` plaintext, or local `.direnv/` state. + +## Commit & Pull Request Guidelines + +Recent history favors short, lowercase, imperative subjects such as `fix` and `update action`; automated dependency commits use `chore(deps): ...`. Prefer a specific summary that states the affected area, such as `shells: add deployment tools`. Keep commits focused. Pull requests should explain the motivation, list affected hosts or profiles, report validation commands, and note any manual migration or secret-management steps. Include screenshots only for visible desktop or application configuration changes. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6ed21e3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# moons14 dotfiles + +My NixOS + Home Manager configurations build with flake.