sudo, but the initial deployment and system-configuration updates require administrator access.
If you can trust the Agent or run only in a disposable VM, read Let a Sandbox Use Docker first to choose a Docker socket or raw privileged DinD. Neither needs this host profile.
Prerequisites
Before you begin, confirm that:- NixOS manages its system configuration with flakes.
- The host uses systemd and cgroup v2.
- You know the NixOS username that runs NiceEval day to day.
- The host has enough CPU, memory, and disk for eval containers.
flake.nix, the configuration is named my-host, and the day-to-day username is alice. Replace them with your own values.
Add the NiceEval module
Add NiceEval as an input in the system configuration’sflake.nix, then put its module in the host’s modules:
flake.nix
flake.lock. Commit that lock file so different machines do not use different module versions at an unreviewed time.
Declare a profile
Declare a profile nameddefault in the NixOS configuration:
configuration.nix
capacity is the budget NiceEval may assign to eval work. aggregate is the hard limit shared by the daemon, build processes, watchdog, and eval containers, so none of its values can be smaller than capacity. Leave the difference for host-side overhead.
loop-ext4 creates a sparse image at /var/lib/niceeval/docker-profiles/default.img and mounts it as Docker’s data root. size is the profile’s disk limit; it does not mean a rebuild immediately consumes that much physical space.
Apply the system configuration
First check that the configuration evaluates, then switch the system:alice to the profile’s access group. After rebuilding, sign out of the current login session and sign in again so the new supplementary group membership takes effect. Rerunning commands only in the old shell does not refresh supplementary groups.
After signing in again, check the services:
active (running). If either fails, read the corresponding unit log:
Verify the profile
In an eval project with NiceEval installed, run these commands as the day-to-day user:list should show default. doctor always checks the descriptor, Unix socket, cgroup, capacity, watchdog, offline assets, a cold build, and a constrained outer container with nested Docker. Use the host profile for production evals only after every check passes.
Do not use sudo pnpm exec niceeval ... to bypass a permissions error. If the day-to-day user cannot access the profile, first confirm that the username is in accessUsers, then sign in again and rerun doctor.
Use it in an Experiment
After the host passes verification, reference the same alias in an Experiment’s Docker Sandbox:maxConcurrency, then increase concurrency according to the profile’s capacity.