From dd1f20d08da8681ded3ef6d8789b3e7c693c0d3e Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Sat, 21 Jun 2025 13:19:22 +0200 Subject: [PATCH] added aider-chat for testing --- .aider.conf.yml | 52 +++++++++++++++++++++++++++++++++++++++ flake.lock | 12 ++++----- modules/ai/aider-chat.nix | 6 +++++ modules/users/geir.nix | 20 +++++++-------- 4 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 .aider.conf.yml create mode 100644 modules/ai/aider-chat.nix diff --git a/.aider.conf.yml b/.aider.conf.yml new file mode 100644 index 0000000..f9db97c --- /dev/null +++ b/.aider.conf.yml @@ -0,0 +1,52 @@ +# AiderChat configuration file + +# 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. + +# 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 + +# 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. + +# Workflow settings +workflow: + auto_save: true + auto_commit: false + branch_name: aiderchat-updates + commit_message_template: > + [AiderChat] {description} + +# Logging +logging: + level: info + file: aiderchat.log + +# 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 diff --git a/flake.lock b/flake.lock index d0c776e..e4104b3 100644 --- a/flake.lock +++ b/flake.lock @@ -54,11 +54,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1750134718, - "narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=", + "lastModified": 1750365781, + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c", + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", "type": "github" }, "original": { @@ -70,11 +70,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1750133334, - "narHash": "sha256-urV51uWH7fVnhIvsZIELIYalMYsyr2FCalvlRTzqWRw=", + "lastModified": 1750400657, + "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "36ab78dab7da2e4e27911007033713bab534187b", + "rev": "b2485d56967598da068b5a6946dadda8bfcbcd37", "type": "github" }, "original": { diff --git a/modules/ai/aider-chat.nix b/modules/ai/aider-chat.nix new file mode 100644 index 0000000..ad75c33 --- /dev/null +++ b/modules/ai/aider-chat.nix @@ -0,0 +1,6 @@ +# TODO install the latest version of Aider Chat +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + aider-chat-full + ]; +} diff --git a/modules/users/geir.nix b/modules/users/geir.nix index bb1e65c..ccf8a36 100644 --- a/modules/users/geir.nix +++ b/modules/users/geir.nix @@ -10,23 +10,23 @@ in { imports = [ ./media-group.nix + ../ai/aider-chat.nix ]; users.users.geir = { description = "Geir Okkenhaug Jerstad - Primary User"; isNormalUser = true; - # User groups for development and desktop use extraGroups = [ - "wheel" # sudo access - "networkmanager" # network management - "libvirt" # virtualization - "incus-admin" # container management - "podman" # container runtime - "audio" # audio devices - "video" # video devices - "render" # GPU access - "media" # shared media access for NFS shares + "wheel" + "networkmanager" + "libvirt" + "incus-admin" + "podman" + "audio" + "video" + "render" + "media" ]; shell = pkgs.zsh;