refactor: remove legacy mkOpencodeRules alias and opencode-rules compat entry
- Remove mkOpencodeRules backward-compat alias from lib/coding-rules.nix - Remove opencode-rules alias from lib/default.nix - Update shells/opencode.nix to use mkCodingRules / coding-rules - Remove backward-compat test from tests/lib/coding-rules-test.nix - Update AGENTS.md and modules/home-manager/AGENTS.md docs - Apply nix fmt formatting to shared-options.nix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# OpenCode development environment with AI coding rules
|
||||
# This shell demonstrates the mkOpencodeRules library provided by this repository
|
||||
# This shell demonstrates the mkCodingRules library provided by this repository
|
||||
# Usage: nix develop .#opencode
|
||||
#
|
||||
# To enable OpenCode rules, add the agents input to your flake:
|
||||
@@ -13,16 +13,16 @@
|
||||
inputs ? null,
|
||||
agents ? null,
|
||||
}: let
|
||||
# Import the opencode-rules library
|
||||
# Import the coding-rules library
|
||||
m3taLib = import ../lib {lib = pkgs.lib;};
|
||||
|
||||
# Import custom packages
|
||||
customPackages = import ../pkgs {inherit pkgs inputs;};
|
||||
|
||||
# Create rules configuration only if agents input is provided
|
||||
# This demonstrates how to use mkOpencodeRules in a real project
|
||||
# This demonstrates how to use mkCodingRules in a real project
|
||||
rulesConfig = lib.optionalAttrs (agents != null) {
|
||||
rules = m3taLib.opencode-rules.mkOpencodeRules {
|
||||
rules = m3taLib.coding-rules.mkCodingRules {
|
||||
# Pass the AGENTS repository path
|
||||
inherit agents;
|
||||
|
||||
@@ -75,7 +75,7 @@ in
|
||||
shellHook = ''
|
||||
echo "🤖 OpenCode Development Environment"
|
||||
echo ""
|
||||
echo "This environment demonstrates the mkOpencodeRules library"
|
||||
echo "This environment demonstrates the mkCodingRules library"
|
||||
echo "provided by the m3ta-nixpkgs repository."
|
||||
echo ""
|
||||
|
||||
@@ -121,7 +121,7 @@ in
|
||||
${
|
||||
if (agents == null)
|
||||
then ''
|
||||
echo "💡 Using mkOpencodeRules in your project:"
|
||||
echo "💡 Using mkCodingRules in your project:"
|
||||
echo ""
|
||||
echo "Add to your flake.nix:"
|
||||
echo " inputs = {"
|
||||
@@ -137,7 +137,7 @@ in
|
||||
echo " system = \"x86_64-linux\";"
|
||||
echo " pkgs = nixpkgs.legacyPackages.''${system};"
|
||||
echo " m3taLib = m3ta-nixpkgs.lib.''${system};"
|
||||
echo " rules = m3taLib.opencode-rules.mkOpencodeRules {"
|
||||
echo " rules = m3taLib.coding-rules.mkCodingRules {
|
||||
echo " inherit agents;"
|
||||
echo " languages = [\"python\" \"typescript\"];"
|
||||
echo " frameworks = [\"n8n\"];"
|
||||
|
||||
Reference in New Issue
Block a user