Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

GuestModule to importOption reference
Baguette VMnixosModules.baguetteBaguette
LXC container in TerminanixosModules.crostiniCrostini

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.

TaskDocumentation
Set Baguette image resourcesDisk size, build memory
Start Baguette with an ephemeral rootEphemeral root guide
Run Wayland applications without X11Baguette, LXC
Remove optional command-line toolsBaguette, LXC
Control host forwarding in BaguettePorts, 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.