Files
nix-config-ryan4yin/hosts/idols-ruby/default.nix
T
ryan4yin | 二花 ff7102d75b feat(agents): align ruby and kana computer-use support (#514)
* feat(agents): align ruby and kana computer-use support

Assisted-by: DeepSeek Harness (deepseek-flash)

* test(agents): keep one full-host test for ruby and kana

Both guests run the same agent configuration, so a second full-host test
does not add coverage.

Assisted-by: DeepSeek Harness (deepseek-flash)

* fix(computer-use): disable cua-driver telemetry before start

The i3 init hook did not reliably disable the default-on setting, so both
hosts could start the daemon with telemetry enabled.

Assisted-by: DeepSeek Harness (deepseek-flash)
2026-11-03 23:08:51 +08:00

89 lines
2.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
myvars,
mylib,
...
}:
#############################################################
#
# Ruby - a NixOS VM running under libvirt
#
#############################################################
let
hostName = "ruby"; # Define your hostname.
inherit (myvars.networking) proxyGateway proxyGateway6 nameservers;
inherit (myvars.networking.hostsAddr.${hostName}) iface ipv4;
ipv4WithMask = "${ipv4}/24";
in
{
# Headless computer-use environment (Xvfb + i3 + desktop automation + browser).
modules.desktop.computerUse.enable = true;
# supported file systems, so we can mount any removable disks with these filesystems
boot.supportedFilesystems = [
"ext4"
"btrfs"
"xfs"
#"zfs"
"ntfs"
"fat"
"vfat"
"exfat"
];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
networking = {
inherit hostName;
# we use networkd instead
networkmanager.enable = false;
useDHCP = false;
};
networking.useNetworkd = true;
systemd.network.enable = true;
systemd.network.networks."10-${iface}" = {
matchConfig.Name = [ iface ];
networkConfig = {
Address = [ ipv4WithMask ];
# DNS goes to the proxy gateway, which resolves through the proxy;
# `nameservers` is the plain upstream-DNS alternative.
# DNS = nameservers;
DNS = [ proxyGateway ];
DHCP = "ipv6"; # enable DHCPv6 only, so we can get a GUA.
IPv6AcceptRA = true; # for Stateless IPv6 Autoconfiguration (SLAAC)
LinkLocalAddressing = "ipv6";
};
routes = [
{
Destination = "0.0.0.0/0";
Gateway = proxyGateway;
}
{
Destination = "::/0";
Gateway = proxyGateway6;
GatewayOnLink = true; # it's a gateway on local link.
}
];
linkConfig.RequiredForOnline = "routable";
};
# systemd-journal - reduce disk usage
# https://www.freedesktop.org/software/systemd/man/latest/journald.conf.html
services.journald.settings.Journal = {
SystemMaxUse = "2G";
RuntimeMaxUse = "256M";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}