UWSM
UWSM (Universal Wayland Session Manager), wraps standalone Wayland compositors with a set of Systemd units on the fly. This essentially binds the Wayland compositor into graphical-session-pre.target, graphical-session.target, xdg-desktop-autostart.target.
This is useful for Wayland compositors like Hyprland, Sway, Wayfire, etc. that do not start these targets and services on their own.
Additional information may be found on the UWSM Github, or the Arch Wiki page.
Installation
Options may be found under programs.uwsm in Nix options. An example using Sway with UWSM:
❄︎ /etc/nixos/configuration.nix
programs.uwsm = {
enable = true;
# You must configure the waylandCompositors suboptions so that UWSM knows which compositors to manage.
waylandCompositors = {
sway = {
prettyName = "Sway";
comment = "Sway compositor managed by UWSM";
binPath = "/run/current-system/sw/bin/sway";
};
};
};
Note: This by default uses
dbus-broker as the dbus implementation for better compatibility. If you dislike this behavior you may set services.dbus.implementation = lib.mkForce "dbus" in your configuration.Hyprland
Hyprland has a built in option for UWSM that will automatically handle setup. Automatically starts appropriate targets such as graphical-session.target, and wayland-session@Hyprland.target.
Note: Some changes may need to be made to Hyprland configs depending on your setup, see the UWSM wiki Page.
❄︎ /etc/nixos/configuration.nix
programs.hyprland = {
enable = true;
withUWSM = true;
};