Commit cdbba480fa1c
Changed files (1)
home
common
dev
home/common/dev/ai.nix
@@ -8,6 +8,26 @@ let
# Unified AI agent storage (XDG-compliant)
# Physical storage in ai-sync (syncthing folder), symlinked to ai/
aiSyncDir = "${config.xdg.dataHome}/ai-sync";
+ # Wrap Node.js-based CLI tools with LD_LIBRARY_PATH for NSS resolution
+ # on non-NixOS hosts (Fedora CSB) where user accounts come from sssd.
+ # Without this, libuv's uv_os_get_passwd fails with ENOENT.
+ # ponytail: blanket /usr/lib64; scope to just libnss_sss if issues arise
+ isNonNixOS = !builtins.pathExists /etc/NIXOS;
+ wrapForNSS =
+ pkg:
+ if isNonNixOS then
+ pkgs.symlinkJoin {
+ name = pkg.name;
+ paths = [ pkg ];
+ nativeBuildInputs = [ pkgs.makeWrapper ];
+ postBuild = ''
+ for f in $out/bin/*; do
+ wrapProgram "$f" --prefix LD_LIBRARY_PATH : /usr/lib64
+ done
+ '';
+ }
+ else
+ pkg;
in
{
# Ensure claude-sync directory structure exists (legacy, still used by claude)
@@ -90,7 +110,7 @@ in
# AI coding agents (from numtide/llm-agents.nix)
llm-agents.claude-code
llm-agents.claude-agent-acp
- llm-agents.gemini-cli
+ (wrapForNSS llm-agents.gemini-cli)
llm-agents.opencode
llm-agents.pi
llm-agents.skills