···157157You may make any other changes to your VM in this attribute set. For example,
158158you could enable Docker or X11 forwarding to your Darwin host.
159159160160+## Troubleshooting the generated configuration {#sec-darwin-builder-troubleshoot}
161161+162162+The `linux-builder` package exposes the attributes `nixosConfig` and `nixosOptions` that allow you to inspect the generated NixOS configuration in the `nix repl`. For example:
163163+164164+```
165165+$ nix repl --file ~/src/nixpkgs --argstr system aarch64-darwin
166166+167167+nix-repl> darwin.linux-builder.nixosConfig.nix.package
168168+«derivation /nix/store/...-nix-2.17.0.drv»
169169+170170+nix-repl> :p darwin.linux-builder.nixosOptions.virtualisation.memorySize.definitionsWithLocations
171171+[ { file = "/home/user/src/nixpkgs/nixos/modules/profiles/macos-builder.nix"; value = 3072; } ]
172172+173173+```
···1616```ShellSession
1717$ cd /path/to/nixpkgs/nixos/doc/manual
1818$ nix-shell
1919-nix-shell$ make
1919+nix-shell$ devmode
2020```
21212222Once you are done making modifications to the manual, it's important to
+7-1
nixos/modules/profiles/macos-builder.nix
···11-{ config, lib, ... }:
11+{ config, lib, options, ... }:
2233let
44 keysDirectory = "/var/keys";
···163163164164 in
165165 script.overrideAttrs (old: {
166166+ pos = __curPos; # sets meta.position to point here; see script binding above for package definition
166167 meta = (old.meta or { }) // {
167168 platforms = lib.platforms.darwin;
169169+ };
170170+ passthru = (old.passthru or { }) // {
171171+ # Let users in the repl inspect the config
172172+ nixosConfig = config;
173173+ nixosOptions = options;
168174 };
169175 });
170176