Skip to content

Commit 80dae49

Browse files
committed
docs: more info on running tests
1 parent f5ce58d commit 80dae49

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

nix/docs/system-manager.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,31 @@ When adding a new module, extend the `testScript` with an additional `subtest` b
178178

179179
### Running tests locally
180180

181-
Run the system-manager check locally with:
181+
The container tests use `systemd-nspawn` which requires the `uid-range` nix feature. This in turn requires `auto-allocate-uids` and the `auto-allocate-uids` experimental feature to be enabled on the Linux machine running the tests.
182+
183+
**On macOS:** These tests cannot run natively on macOS. You need to enter the shell of a Linux VM (e.g. an Ubuntu VM via OrbStack, UTM, or similar) and run the tests from there.
184+
185+
Ensure your Linux machine's `/etc/nix/nix.conf` includes:
186+
187+
```
188+
auto-allocate-uids = true
189+
extra-experimental-features = nix-command flakes auto-allocate-uids cgroups
190+
trusted-users = root @wheel @sudo
191+
```
192+
193+
After updating the config, restart the nix daemon:
194+
195+
```bash
196+
sudo systemctl restart nix-daemon
197+
```
198+
199+
Then run the system-manager check:
200+
201+
```bash
202+
nix build .#checks.aarch64-linux.check-system-manager -L
203+
```
204+
205+
Or for x86_64:
182206

183207
```bash
184208
nix build .#checks.x86_64-linux.check-system-manager -L

0 commit comments

Comments
 (0)