Integrate pi
This commit is contained in:
25
modules/home/pi.nix
Normal file
25
modules/home/pi.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user