| .. | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| result | ||
Octofriend flake for Nix/NixOS
This flake packages octofriend, a CLI coding assistant.
Building
nix build .
Running
nix run .
Installation
Add to your NixOS configuration:
inputs.octofriend.url = "path:/home/jsutter/src/nixos/appflakes/octofriend";
# Then in your environment.systemPackages or home.packages:
self.inputs.octofriend.packages.${system}.default
Configuration
The octofriend flake includes default configuration files at /share/octofriend/config/octofriend.json5. However, API keys should not be stored in the repository for security reasons.
Default Configuration
The included configuration provides:
- Your name as 'Jules'
- Two model configurations (GLM-4.6 and MiniMax M2) pointing to https://api.synthetic.new
- Specialized models for diff-apply and fix-json operations
API Keys
To configure API keys, create a keys.json5 file in your configuration directory:
{
'https://api.synthetic.new/v1': 'your-api-key-here'
}
When using octofriend, you can either:
- Place your keys in
~/.config/octofriend/keys.json5(default location) - Set the
OCTOFRIEND_CONFIG_DIRenvironment variable to a custom directory containing your files
This ensures sensitive API keys are not committed to the repository while still providing functional default configuration.
Custom Configuration
If you want to override the default configuration, you can create your own octofriend.json5 file in your config directory. The wrapper script will check for configuration files in the following order:
$OCTOFRIEND_CONFIG_DIR/octofriend.json5(if OCTOFRIEND_CONFIG_DIR is set)~/.config/octofriend/octofriend.json5- Fall back to the included default at
$OCTOFRIEND_PACKAGE_DIR/share/octofriend/config/octofriend.json5
Security Note
- The
keys.json5file containing API keys is intentionally NOT included in this flake - Never commit API keys to any repository
- The included configuration uses placeholder settings and should be customized with your actual model preferences and endpoints