diff --git a/home/programs/aichat.nix b/home/programs/aichat.nix index 6e5371d7..c6c2c1e2 100644 --- a/home/programs/aichat.nix +++ b/home/programs/aichat.nix @@ -124,7 +124,7 @@ name = "gpt-3.5-turbo"; } { - name = "gpt-4o"; + name = "gpt-5-nano"; } { name = "o4-mini-high"; @@ -153,5 +153,17 @@ } ]; }; + roles = { + "%git-commit%" = + /* + md + */ + '' + --- + model: openai:gpt-4o + --- + Your task is to generate a concise and informative commit message based on the provided diff. Use the conventional commit format, which includes a type (feat, fix, chore, docs, style, refactor, perf, test) and an optional scope. The message should be in the imperative mood and should not exceed 72 characters in the subject line. Don't include any additional text or explanations, just the commit message. + ''; + }; }; } diff --git a/modules/aichat.nix b/modules/aichat.nix index 47bd6012..c2e37baf 100644 --- a/modules/aichat.nix +++ b/modules/aichat.nix @@ -75,7 +75,11 @@ in { settings = lib.mkOption { type = yamlFormat.type; - description = "Options"; + description = "Settings"; + }; + roles = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + description = "Roles for the AI chat clients"; }; }; }; @@ -102,7 +106,11 @@ in { programs.zsh.initExtra = mkIf cfg.enableZshIntegration zshIntegration; programs.nushell.extraConfig = mkIf cfg.enableNushellIntegration nuIntegration; - xdg.configFile."aichat/config.yaml".source = - yamlFormat.generate "config.yaml" cfg.settings; + xdg.configFile = + { + "aichat/config.yaml".source = + yamlFormat.generate "config.yaml" cfg.settings; + } + // (mapAttrs' (name: role: nameValuePair "aichat/roles/${name}.md" {text = role;}) cfg.roles); }; }