feat(agents): add gitIdentity module
- Renamed shared-options.nix to shared/shared-options.nix - Created shared/default.nix importing git-identity.nix and shared-options.nix - Created shared/git-identity.nix with gitIdentity option set: - enable: Toggle for agent git identity - name: Git author name (default: m3ta-chiron) - email: Git author email (default: m3ta-chiron@agentmail.to) - signingKey: Optional GPG signing key path - sshKey: SSH private key path for git push auth - Updated opencode.nix, pi.nix, claude-code.nix to import shared/default.nix - Restructured modules to follow proper Nix module syntax with imports at top level
This commit is contained in:
@@ -3,14 +3,16 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
shared = import ./shared-options.nix {inherit lib;};
|
||||
in
|
||||
with lib; let
|
||||
cfg = config.coding.agents.pi;
|
||||
}: {
|
||||
imports = [
|
||||
../shared/default.nix
|
||||
];
|
||||
|
||||
options.coding.agents.pi = let
|
||||
shared = import ../shared/shared-options.nix {inherit lib;};
|
||||
mcpCfg = config.programs.mcp or null;
|
||||
in {
|
||||
options.coding.agents.pi = {
|
||||
in
|
||||
with lib; {
|
||||
enable = mkEnableOption "Pi agent management via canonical agent.toml definitions";
|
||||
|
||||
mcpServers = mkOption {
|
||||
@@ -202,7 +204,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (let
|
||||
config = with lib; let
|
||||
shared = import ../shared/shared-options.nix {inherit lib;};
|
||||
cfg = config.coding.agents.pi;
|
||||
in
|
||||
mkIf cfg.enable (let
|
||||
# Build settings.json by filtering out null values recursively
|
||||
filterNulls = attrs:
|
||||
lib.filterAttrs (_: v: v != null) (
|
||||
@@ -281,4 +287,4 @@ in
|
||||
agentFiles
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user