26 lines
750 B
Nix
26 lines
750 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.dot.pi;
|
|
piPath = "${config.dot.dotfilesPath}/modules/pi/agent";
|
|
in
|
|
{
|
|
options.dot.pi = {
|
|
enable = lib.mkEnableOption "managed pi coding agent configuration" // {
|
|
default = true;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# Out-of-store symlinks so the files stay editable without a nix rebuild.
|
|
# Only the managed files are linked; pi's runtime files (auth.json,
|
|
# sessions/, models-store.json) are left untouched in ~/.pi/agent.
|
|
home.file = {
|
|
".pi/agent/settings.json".source =
|
|
config.lib.file.mkOutOfStoreSymlink "${piPath}/settings.json";
|
|
".pi/agent/extensions".source =
|
|
config.lib.file.mkOutOfStoreSymlink "${piPath}/extensions";
|
|
};
|
|
};
|
|
}
|