Files
nix-config/outputs/x86_64-linux/tests/agent-profile/expr.nix
T
Ryan Yin 432de26764 feat(agents): add Qwen Code and use OpenCode V2 as opencode
Expose llm-agents' opencode2 package under the normal opencode command and persist Qwen Code's ~/.qwen state on the ephemeral-root hosts.
2026-11-04 00:15:43 +08:00

43 lines
1.3 KiB
Nix

# The `agent` profile (hosts/README.md#host-profiles): every agent host gets
# the full TUI home role, and the system side only carries what needs root.
{
myvars,
lib,
outputs,
}:
let
username = myvars.username;
hosts = [
"aquamarine"
"ruby"
"kana"
];
hasPackage = name: lib.any (package: (package.pname or "") == name);
in
lib.genAttrs hosts (
name:
let
system = outputs.nixosConfigurations.${name}.config;
home = system.home-manager.users.${username};
in
{
# home role: home/linux/tui.nix
agentsFromHome = hasPackage "codex" home.home.packages;
qwenInstalled = hasPackage "qwen-code" home.home.packages;
devToolsFromHome = hasPackage "kubectl" home.home.packages;
# ~/.secrets is synced to the desktops only; sourcing it would break nushell.
nushellSecrets = home.modules.shell.secrets.enable;
# system module: modules/nixos/agent.nix
nixLd = system.programs.nix-ld.enable;
rootlessPodman = system.virtualisation.podman.enable;
docker = system.virtualisation.docker.enable;
linger = system.users.users.${username}.linger;
# User tools stay out of the system profile.
agentsInSystem = hasPackage "codex" system.environment.systemPackages;
# host switch
computerUse = system.modules.desktop.computerUse.enable;
}
)