mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-29 17:52:32 +01:00
Expose llm-agents' opencode2 package under the normal opencode command and persist Qwen Code's ~/.qwen state on the ephemeral-root hosts.
43 lines
1.3 KiB
Nix
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;
|
|
}
|
|
)
|