From fb45c41a934d8f979ae6c86cac0111c6f2b31cb1 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Tue, 24 Jun 2025 09:19:33 +0200 Subject: [PATCH] before --- .aider.conf.yml | 139 ++++++++++++++++++++++++++++++++---------------- .gitignore | 3 +- CONVENTIONS.md | 48 +++++++++++++++++ flake.lock | 12 ++--- 4 files changed, 149 insertions(+), 53 deletions(-) create mode 100644 CONVENTIONS.md diff --git a/.aider.conf.yml b/.aider.conf.yml index f9db97c..8451bd6 100644 --- a/.aider.conf.yml +++ b/.aider.conf.yml @@ -1,52 +1,99 @@ -# AiderChat configuration file +########################################################## +# Aider Configuration for Home Lab Project +# Place in your home dir, or at the root of your git repo. +########################################################## -# General settings -project_name: Home Lab -language: guile -description: > - This is the configuration for AiderChat, tailored for managing and orchestrating - the Home Lab project. The project uses Guile for scripting and NixOS for system - configuration. +############# +# Main model: -# File inclusion/exclusion -include: - - "**/*.scm" # Include all Guile Scheme files - - "**/*.nix" # Include all NixOS configuration files - - "**/*.yml" # Include YAML configuration files - - "**/*.md" # Include Markdown documentation files -exclude: - - "**/node_modules/**" # Exclude Node.js dependencies - - "**/.git/**" # Exclude Git metadata - - "**/tmp/**" # Exclude temporary files +## Specify the model to use for the main chat (using Ollama with qwen2.5-coder) +model: ollama/qwen2.5-coder:7b -# Chat settings -chat: - model: ollama - endpoint: http://grey-area:11434 # Ollama service running on grey-area - temperature: 0.7 - max_tokens: 2048 - system_prompt: > - You are an assistant helping with the Home Lab project. Focus on Guile scripting, - NixOS configuration, and infrastructure orchestration. +######################## +# API Keys and settings: -# Workflow settings -workflow: - auto_save: true - auto_commit: false - branch_name: aiderchat-updates - commit_message_template: > - [AiderChat] {description} +## Set environment variables for Ollama +set-env: + - OLLAMA_API_BASE=http://grey-area:11434 -# Logging -logging: - level: info - file: aiderchat.log +################# +# Model settings: -# Extensions -extensions: - - name: nixos-helper - description: > - Provides additional support for NixOS configuration and orchestration tasks. - - name: guile-helper - description: > - Adds syntax highlighting and linting for Guile Scheme files. \ No newline at end of file +## Specify a file with aider model settings for unknown models +model-settings-file: .aider.model.settings.yml + +## Model aliases for convenience +alias: + - "code:ollama/qwen2.5-coder:7b" + - "chat:ollama/llama3.1:8b" + - "reason:ollama/deepseek-r1:latest" + - "task:ollama/taskmaster-qwen:latest" + - "research:ollama/research-deepseek:latest" + - "fast:ollama/qwen3:4b" + +## Specify what edit format the LLM should use +edit-format: diff + +## Specify the model to use for commit messages and chat history summarization +weak-model: ollama/qwen3:4b + +## Verify the SSL cert when connecting to models +verify-ssl: false + +## Timeout in seconds for API calls (increased for slower CPU inference) +timeout: 300 + +## Disable model warnings for faster startup +show-model-warnings: false + +################### +# Repomap settings: + +## Suggested number of tokens to use for repo map (reduced for performance) +map-tokens: 1024 + +## Control how often the repo map is refreshed +map-refresh: manual + +###################### +# File handling: + +## Auto-load convention files for this project +read: + - CONVENTIONS.md + +################ +# History Files: + +## Specify the chat input history file +input-history-file: .aider.input.history + +## Specify the chat history file +chat-history-file: .aider.chat.history.md + +################# +# Cache settings: + +## Enable caching of prompts for better performance +cache-prompts: true + +## Keep cache warm to reduce latency +cache-keepalive-pings: 2 + +################### +# Performance settings: + +## Disable model checking for faster startup +check-model-accepts-settings: false + +## Reduce chat history to save tokens +max-chat-history-tokens: 4096 + +################### +# UI/UX settings: + +## Use dark mode +dark-mode: true + +## Show model warnings +show-model-warnings: false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 803ed60..a8f0d23 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,5 @@ node_modules/ # OS specific # Task files tasks.json -tasks/ \ No newline at end of file +tasks/ +.aider* diff --git a/CONVENTIONS.md b/CONVENTIONS.md new file mode 100644 index 0000000..63dda4d --- /dev/null +++ b/CONVENTIONS.md @@ -0,0 +1,48 @@ +# Home Lab Project Conventions + +## Code Style Guidelines + +### NixOS Configuration + +- Use descriptive variable names in Nix expressions +- Comment complex expressions and configurations +- Follow the NixOS manual conventions for module structure +- Use `lib.mkOption` for configurable options +- Prefer `services.` namespace for service configurations + +### Guile Scheme + +- Use kebab-case for function and variable names +- Prefer pure functions when possible +- Add docstrings for public functions +- Use meaningful parameter names +- Follow GNU Guile coding standards + +### Documentation + +- Use Markdown for all documentation +- Include examples in code documentation +- Keep README files up to date +- Document configuration options clearly + +### Project Structure + +- Keep machine-specific configurations in `machines/` directory +- Use `modules/` for reusable NixOS modules +- Store documentation in `documentation/` directory +- Place scripts in `scripts/` directory +- Research and notes go in `research/` directory + +### Git Workflow + +- Use descriptive commit messages +- Prefix commits with area of change (e.g., "modules:", "docs:", "machines:") +- Create feature branches for significant changes +- Keep commits focused and atomic + +### Security + +- Never commit secrets or API keys +- Use proper file permissions for sensitive files +- Follow NixOS security best practices +- Document security considerations for services diff --git a/flake.lock b/flake.lock index e4104b3..a412777 100644 --- a/flake.lock +++ b/flake.lock @@ -54,11 +54,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1750365781, - "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", + "lastModified": 1750506804, + "narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", + "rev": "4206c4cb56751df534751b058295ea61357bbbaa", "type": "github" }, "original": { @@ -70,11 +70,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1750400657, - "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", + "lastModified": 1750622754, + "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2485d56967598da068b5a6946dadda8bfcbcd37", + "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", "type": "github" }, "original": {