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:
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";
};
};
};
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
Standalone Hyprland with UWSM
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. This option is recommended for if you are using Hyprland standalone, and do not need to configure alternative entries for UWSM. Usage of both options in conjunction may run into issues.
programs.hyprland = {
enable = true;
withUWSM = true;
};
If using the Hyprland Home Manager Module
If you use the Home Manager module, make sure to disable the systemd integration as it conflicts with UWSM.[1]
wayland.windowManager.hyprland.systemd.enable = false;