1# Wayland {#sec-wayland}
2
3While X11 (see [](#sec-x11)) is still the primary display technology
4on NixOS, Wayland support is steadily improving. Where X11 separates the
5X Server and the window manager, on Wayland those are combined: a
6Wayland Compositor is like an X11 window manager, but also embeds the
7Wayland 'Server' functionality. This means it is sufficient to install
8a Wayland Compositor such as sway without separately enabling a Wayland
9server:
10
11```nix
12{
13programs.sway.enable = true;
14}
15```
16
17This installs the sway compositor along with some essential utilities.
18Now you can start sway from the TTY console.
19
20If you are using a wlroots-based compositor, like sway, and want to be
21able to share your screen, you might want to activate this option:
22
23```nix
24{
25 xdg.portal.wlr.enable = true;
26}
27```
28
29and configure Pipewire using
30[](#opt-services.pipewire.enable)
31and related options.