MyNixOS website logo

Codex rules files to manage under CODEX_HOME/rules/.

The attribute name becomes the filename, with a .rules extension added automatically. The value is either:

  • Inline content as a string
  • A path to an existing rules file

This is useful for declaratively managing persistent prefix_rule() definitions, including the default default.rules allow-list Codex writes when you accept recurring approvals interactively.

Declarations
Type
attribute set of (strings concatenated with "\n" or absolute path)
Default
{ }
Example
{
  default = "prefix_rule(pattern = [\"nix\", \"build\"], decision = \"allow\")\n";
  github = ./codex/github.rules;
}