pi-coding-agent: use lib.hm.strings.isPathLike

This commit is contained in:
Austin Horstman
2026-06-05 11:37:17 -05:00
parent c321a1c8a7
commit e621f12c02

View File

@@ -17,12 +17,6 @@ let
jsonFormat = pkgs.formats.json { };
isPathLike =
content:
lib.isPath content
|| (builtins.isString content && lib.hasPrefix "${builtins.storeDir}/" content)
|| lib.isDerivation content;
upstreamConfigDir = "${config.home.homeDirectory}/.pi/agent";
packageWithExtraPackages =
@@ -210,7 +204,7 @@ in
})
(
if isPathLike cfg.context then
if lib.hm.strings.isPathLike cfg.context then
{ "${cfg.configDir}/AGENTS.md".source = cfg.context; }
else
(mkIf (cfg.context != "") {