Configure a ChromeOS guest
Use nixos-crostini to connect a NixOS guest to ChromeOS.
Follow these steps to select a module, configure the guest, and build an image.
1. Select a guest type
| Guest | Module to import | Option reference |
|---|---|---|
| Baguette VM | nixosModules.baguette | Baguette |
| LXC container in Termina | nixosModules.crostini | Crostini |
Import one module for your guest type.
2. Add the module to your flake
For a new configuration, start with the repository template. For an existing flake, follow the Baguette module example or the LXC module example.
Add the selected module to the modules list passed to nixpkgs.lib.nixosSystem.
Keep your guest settings in your own NixOS configuration.
3. Select the ChromeOS account
Replace yourname with the username you use for Linux on ChromeOS:
users.users.yourname = {
isNormalUser = true;
crostini.enable = true;
};
Enable registration for one normal user. See the account option for the registration setting.
4. Set guest behavior
Use your guest’s option reference for types, defaults, and examples.
| Task | Documentation |
|---|---|
| Set Baguette image resources | Disk size, build memory |
| Start Baguette with an ephemeral root | Ephemeral root guide |
| Run Wayland applications without X11 | Baguette, LXC |
| Remove optional command-line tools | Baguette, LXC |
| Control host forwarding in Baguette | Ports, notifications |
For other NixOS settings, use the NixOS option search.
5. Validate, build, and start the guest
Check your configuration:
nix flake check --no-build
Then follow the Baguette image steps or the LXC container steps to build the image and start the guest on ChromeOS.