REQUIRED for any request to change, install, enable, disable, configure or explain something about this VexOS (NixOS) machine: packages, services, features (gaming, development, virtualization, VPN, Sunshine), hostname, bootloader, desktop environment, kernel, drivers, users, network, storage. Triggers: "install", "enable", "turn on/off", "add a program", "change my system", "why is X set", nixos, /etc/nixos, just recipes, rebuild. For "why did X crash / fail / not start" use the vexos-diagnose skill instead.
Install
npx skillscat add victorytek/vexos-ai/vexos Install via the SkillsCat registry.
VexOS
VexOS is a NixOS configuration. The whole operating system is declared in Nix
and built from it, so the system is changed by editing Nix files, never by
editing the running system. A change takes effect only when the user runsjust rebuild. That step belongs to the user, never to you.
Ground rules
- You never apply changes. Do not run
nixos-rebuild switch,nixos-rebuild boot,just rebuild,just switch,just updateornix flake check. These are blocked for you and must stay that way. Edit,
validate, then hand over. - Edit only the host side-files in
/etc/nixos(listed below). The rest
of the configuration is upstream VexOS, pulled from GitHub on every build:
read it freely, never try to change it./nix/storeis read-only. - Never touch
hardware-configuration.nix,vexos-variant,user-override.nix,stateless-user-override.nix,host.nix, anything
under/etc/nixos/secrets/, or anysystem.stateVersionvalue. - Dotfiles are usually owned by Home Manager. A file in
~/.configthat is
a symlink into/nix/storeis rewritten on every rebuild; editing it is
lost. Say so and make the change in Nix instead. - Privilege. Your shell has no terminal for a password prompt, so
sudo
fails. To write a root-owned file usepkexec, which shows the user a
graphical password dialog, e.g.printf '%s' "$content" | pkexec tee /etc/nixos/local.nix >/dev/null.
Eachpkexecis a request for the user's approval: batch your edits, and
say what you are about to write before you ask. - Plan first. Before editing anything, say which files you will change
and how, and wait for the user to agree. Every edit and command asks for
approval anyway; a plan makes those approvals easy to judge.
Know the machine first
cat /etc/nixos/vexos-variant # e.g. vexos-desktop-amd (role-gpu)
just feature list # optional features and their state
just --list # every recipe the user can run
ls /etc/nixos # which side-files exist
nixos-rebuild list-generations | tail -5Roles: desktop, stateless, server, headless-server, htpc, vanilla.
GPU variants: amd, nvidia, nvidia-legacy580, intel, vm.
To read the upstream source this machine is built from:
nix flake metadata /etc/nixos --json \
| jq -r '.locks.nodes."vexos-nix".locked | "\(.owner)/\(.repo) @ \(.rev)"'
nix flake archive /etc/nixos --json | jq -r '.inputs."vexos-nix".path' # local store copyModules live under modules/, the role files are configuration-<role>.nix,
custom options are named vexos.*. Search the store copy with grep -rn to
find what an option does before suggesting it.
Where a change goes (in this order)
A
justrecipe, if one exists. It knows the right file and format.
Run it only if it merely edits files. If it also rebuilds (most do not; read
the recipe withjust --show <name>first), tell the user to run it instead.
Examples:just feature enable gaming,just set-hostname <name>,just service enable <service>(server roles),just bootloader switch.The side-file that owns the setting:
File Holds features.nixvexos.features.<name>.enabletoggles: gaming, development, print3d, virtualization, sunshine, vpn, ai;vexos.desktop.environmentserver-services.nixvexos.server.<service>.enable(server roles)hostname.nixnetworking.hostNamebootloader.nixbootloader choice hardware-local.nixASUS / OpenRGB hardware options local.nixeverything else: extra packages, udev rules, services, tweaks /etc/nixos/local.nixfor anything that is not a feature or recipe. It is
an ordinary NixOS module owned by the user and never overwritten:{ config, pkgs, lib, ... }: { environment.systemPackages = with pkgs; [ htop ]; }Before using it, confirm this machine loads it:
grep -q '\./local\.nix' /etc/nixos/flake.nix. If that fails, the wrapper
predates local.nix: tell the user thatvexos-update(or the Up app) adds it
automatically on the next update, and stop.pkgs.unstable.<name>is available for packages newer than the stable
channel. Find packages withnix search nixpkgs <term>and options withman configuration.nixor the mcp-nixos tool when it is configured.
Keep changes minimal and commented. Prefer a VexOS option (vexos.*) over
setting the underlying NixOS option directly, because the VexOS one is what the
rest of the config expects.
Validate every change
variant=$(cat /etc/nixos/vexos-variant)
nixos-rebuild dry-build --impure --flake "path:/etc/nixos#$variant"This evaluates the whole system and changes nothing. If it fails with a
permission error, the host has root-only files in /etc/nixos. Run the same
command through pkexec instead. If it fails on your change, fix it. If it
fails for a reason unrelated to your change, report that and stop.
Hand over
Finish every change with:
- What you changed, file by file, and why (
diffold against new if useful). - The dry-build result.
- The exact command for the user:
just rebuild. - How to undo: revert the file, or after rebuilding,
just rollback(or
choose the previous generation in the boot menu).
Never say a change is applied, active or done before the user has rebuilt.