refactor: host profiles; give ruby, kana and aquamarine the TUI home (#512)

- Add the agent profile (modules/nixos/agent.nix: rootless Podman, linger,
  nix-ld) with home/linux/tui.nix as its home role; ruby, kana and
  aquamarine use it, so hosts no longer import from hosts/idols-ruby.
- Gate nushell's ~/.secrets source behind modules.shell.secrets.enable,
  off on agent hosts.
- Persist the TUI home state on aquamarine's tmpfs root.
- Document host profiles in hosts/README.md; add tests/agent-profile and
  drop the x86_64 colmena-parity test, which needs mysecrets.

Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-11-03 04:57:06 -06:00
1 parent eb6f6c34f0
commit 9a307b313d
31 files changed
+301 -147

No files matched your search

+2 -3
View File
@@ -1,8 +1,7 @@
# Idols - Ruby
NixOS VM running under libvirt on `shoryu`, used to run AI agents. It owns the shared agent and
computer-use modules (`packages.nix`, `computer-use.nix`, `oci-containers/`) that
[`idols-kana`](../idols-kana/) imports.
NixOS VM running under libvirt on `shoryu`, used to run AI agents. Profile: `agent`, see
[Host Profiles](../README.md#host-profiles).
- Deploy from the VM with `just local`.
- Host inventory and role context: [`../README.md`](../README.md).
-4
View File
@@ -1,4 +0,0 @@
{
# Headless computer-use environment (sway + desktop automation + browser).
modules.desktop.computerUse.enable = true;
}
+2 -5
View File
@@ -16,11 +16,8 @@ let
ipv4WithMask = "${ipv4}/24";
in
{
imports = [
./packages.nix
./computer-use.nix
./oci-containers
];
# Headless computer-use environment (Xvfb + i3 + desktop automation + browser).
modules.desktop.computerUse.enable = true;
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation.
boot.binfmt.emulatedSystems = [
@@ -1,17 +0,0 @@
{
mylib,
lib,
pkgs,
...
}:
{
imports = mylib.scanPaths ./.;
virtualisation = {
docker.enable = true;
oci-containers = {
backend = "docker";
};
};
}
-91
View File
@@ -1,91 +0,0 @@
{
pkgs,
llm-agents,
...
}:
let
agentPackages = llm-agents.packages.${pkgs.stdenv.hostPlatform.system};
in
{
# https://github.com/Mic92/nix-ld
#
# nix-ld will install itself at `/lib64/ld-linux-x86-64.so.2` so that
# it can be used as the dynamic linker for non-NixOS binaries.
#
# nix-ld works like a middleware between the actual link loader located at `/nix/store/.../ld-linux-x86-64.so.2`
# and the non-NixOS binaries. It will:
#
# 1. read the `NIX_LD` environment variable and use it to find the actual link loader.
# 2. read the `NIX_LD_LIBRARY_PATH` environment variable and use it to set the `LD_LIBRARY_PATH` environment variable
# for the actual link loader.
#
# nix-ld's nixos module will set default values for `NIX_LD` and `NIX_LD_LIBRARY_PATH` environment variables, so
# it can work out of the box:
#
# - https://github.com/NixOS/nixpkgs/blob/nixos-26.05/nixos/modules/programs/nix-ld.nix#L42-L45
#
# You can overwrite `NIX_LD_LIBRARY_PATH` in the environment where you run the non-NixOS binaries to customize the
# search path for shared libraries.
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
];
};
environment.systemPackages =
with pkgs;
[
nodejs_24
pnpm
#-- python
uv # python project package manager
(python313.withPackages (
ps: with ps; [
pandas
requests
pyquery
pyyaml
numpy
# model downloaders
huggingface-hub
]
))
rustc
cargo # rust package manager
go
# cryptography
age
sops
rclone
gnupg
# cloud-native
kubectl
istioctl
kubernetes-helm
fluxcd
terraform
# db related
pgcli
mongosh
sqlite
yt-dlp # youtube/bilibili/soundcloud/... video/music downloader
]
# AI Agent Tools
++ [
# Agents
agentPackages.codex
agentPackages.opencode2
agentPackages.pi
# dsh from nur-packages: llm-agents.nix's dsh cannot boot on nixpkgs node
# (node-addon-require-builtin probe), this one shims it.
pkgs.dsh
];
}