mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
aider-chat: add module
This commit is contained in:
parent
fb2ae64bed
commit
9947d3c003
4 changed files with 82 additions and 0 deletions
50
modules/programs/aider-chat.nix
Normal file
50
modules/programs/aider-chat.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkIf
|
||||||
|
mkEnableOption
|
||||||
|
mkPackageOption
|
||||||
|
mkOption
|
||||||
|
;
|
||||||
|
|
||||||
|
cfg = config.programs.aider-chat;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
|
||||||
|
options.programs.aider-chat = {
|
||||||
|
enable = mkEnableOption "aider-chat";
|
||||||
|
package = mkPackageOption pkgs "aider-chat" { nullable = true; };
|
||||||
|
settings = mkOption {
|
||||||
|
inherit (yamlFormat) type;
|
||||||
|
default = { };
|
||||||
|
example = {
|
||||||
|
verify-ssl = false;
|
||||||
|
architect = true;
|
||||||
|
auto-accept-architect = false;
|
||||||
|
show-model-warnings = false;
|
||||||
|
check-model-accepts-settings = false;
|
||||||
|
cache-prompts = true;
|
||||||
|
dark-mode = true;
|
||||||
|
dirty-commits = false;
|
||||||
|
lint = true;
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Configuration settings for aider-chat. All the available options can be found here:
|
||||||
|
<https://aider.chat/docs/config/aider_conf.html#sample-yaml-config-file>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = mkIf (cfg.package != null) [ cfg.package ];
|
||||||
|
home.file.".aider.conf.yml" = mkIf (cfg.settings != { }) {
|
||||||
|
source = yamlFormat.generate "aider.conf.yml" cfg.settings;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
tests/modules/programs/aider-chat/aider.conf.yml
Normal file
9
tests/modules/programs/aider-chat/aider.conf.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
architect: true
|
||||||
|
auto-accept-architect: false
|
||||||
|
cache-prompts: true
|
||||||
|
check-model-accepts-settings: false
|
||||||
|
dark-mode: true
|
||||||
|
dirty-commits: false
|
||||||
|
lint: true
|
||||||
|
show-model-warnings: false
|
||||||
|
verify-ssl: false
|
||||||
1
tests/modules/programs/aider-chat/default.nix
Normal file
1
tests/modules/programs/aider-chat/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{ aider-chat-example-config = ./example-config.nix; }
|
||||||
22
tests/modules/programs/aider-chat/example-config.nix
Normal file
22
tests/modules/programs/aider-chat/example-config.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
programs.aider-chat = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
verify-ssl = false;
|
||||||
|
architect = true;
|
||||||
|
auto-accept-architect = false;
|
||||||
|
show-model-warnings = false;
|
||||||
|
check-model-accepts-settings = false;
|
||||||
|
cache-prompts = true;
|
||||||
|
dark-mode = true;
|
||||||
|
dirty-commits = false;
|
||||||
|
lint = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.aider.conf.yml
|
||||||
|
assertFileContent home-files/.aider.conf.yml \
|
||||||
|
${./aider.conf.yml}
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue