mirror of
https://github.com/nix-community/home-manager.git
synced 2026-12-06 04:40:17 +00:00
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.
33 lines
658 B
Nix
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}"
|
|
'';
|
|
}
|