feat: add aider program module
This commit is contained in:
parent
dfc604f0c0
commit
f0ec045042
2 changed files with 29 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
webis.enable = true;
|
||||
};
|
||||
programs.prismlauncher.enable = true;
|
||||
programs.aider.enable = true;
|
||||
services.wallpaper.enable = true;
|
||||
};
|
||||
|
||||
|
|
28
modules/programs/aider.nix
Normal file
28
modules/programs/aider.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.aider;
|
||||
|
||||
wrapped = pkgs.writeShellApplication {
|
||||
name = "aider";
|
||||
text = ''
|
||||
aider --openai-api-key "$(cat /run/agenix/openai)" --no-attribute-author --no-attribute-committer "$@"
|
||||
'';
|
||||
runtimeInputs = [ cfg.package ];
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.programs.aider = {
|
||||
enable = mkEnableOption "ssh";
|
||||
package = mkPackageOption pkgs "aider-chat" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ wrapped ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue