Files
Austin Horstman a7b9fd5a53 pi-coding-agent: add opt-in mutable settings
Keep settings writable while applying declared values. Match packages by
native npm, Git and lexical local-path identities so declarations
replace equivalent saved entries without reordering unrelated packages.
2026-10-24 21:53:25 -05:00

33 lines
658 B
Nix

{
config,
pkgs,
...
}:
let
target = "custom pi/settings.json";
in
{
programs.pi-coding-agent = {
package = null;
mutableSettings = true;
configDir = "${config.home.homeDirectory}/custom pi";
enable = true;
settings = { };
};
assertions = [
{
assertion = !(config.home.activation ? piCodingAgentMutableSettings);
message = "Pi must merge only enabled, nonempty settings.";
}
{
assertion = !(builtins.elem pkgs.pi-coding-agent config.home.packages);
message = "A null Pi package must not be installed.";
}
];
nmt.script = ''
assertPathNotExists "home-files/${target}"
'';
}