switch to uwsp

This commit is contained in:
Daniel Bulant 2026-08-28 15:07:27 +02:00
parent 7d5aeaa4f0
commit 43112f8228
No known key found for this signature in database
3 changed files with 27 additions and 6 deletions

View file

@ -91,15 +91,12 @@ hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
hl.gesture({ fingers = 3, direction = "up", action = "fullscreen" })
hl.gesture({ fingers = 3, direction = "down", action = "fullscreen", mode = "maximize" })
-- Import the completed session environment before launching long-lived helpers.
-- UWSM imports the session environment before Hyprland starts.
hl.on("hyprland.start", function()
local commands = {
"dbus-update-activation-environment --systemd --all",
"systemctl --user import-environment WAYLAND_DISPLAY DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE WLR_DRM_DEVICES LIBVA_DRIVER_NAME __GLX_VENDOR_LIBRARY_NAME QT_QPA_PLATFORM QT_QPA_PLATFORMTHEME GDK_BACKEND MOZ_ENABLE_WAYLAND PATH XDG_DATA_DIRS XDG_CONFIG_DIRS DBUS_SESSION_BUS_ADDRESS",
"systemctl --user start hyprpolkitagent",
"otd-daemon",
"lorri daemon",
"/etc/pam_init",
"blueman-applet",
"udev-block-notify",
"echo us > /tmp/kb_layout",
@ -112,7 +109,6 @@ hl.on("hyprland.start", function()
"easyeffects --gapplication-service",
"voxtype daemon",
"openrgb --startminimized",
"dms run",
}
for _, command in ipairs(commands) do hl.exec_cmd(command) end
end)

View file

@ -109,6 +109,7 @@
LC_TIME = "en_GB.UTF-8";
};
services.displayManager.sddm.enable = true;
services.displayManager.defaultSession = "hyprland-uwsm";
services.desktopManager.plasma6 = {
enable = true;
};
@ -227,6 +228,7 @@
# package = unstable-pkgs.hyprland;
};
programs.uwsm.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
@ -270,6 +272,29 @@
compositor.name = "hyprland"; # "niri" or "hyprland" or "sway"
configHome = "/home/dan";
};
# DMS otherwise falls back to whichever session desktop file finishes loading
# first. Seed its per-boot memory so the UWSM-managed session is deterministic.
systemd.tmpfiles.settings."20-dms-greeter-default-session" = {
"/var/lib/dms-greeter/.local".d = {
user = "greeter";
group = "greeter";
mode = "0750";
};
"/var/lib/dms-greeter/.local/state".d = {
user = "greeter";
group = "greeter";
mode = "0750";
};
"/var/lib/dms-greeter/.local/state/memory.json"."f+" = {
user = "greeter";
group = "greeter";
mode = "0640";
argument = builtins.toJSON {
lastSessionDesktopId = "hyprland-uwsm";
lastSuccessfulUser = "dan";
};
};
};
security.pam.services = {
greetd.kwallet = {
enable = true;

View file

@ -470,7 +470,7 @@ in
# programs.dsearch.enable = true;
programs.dank-material-shell = {
enable = true;
systemd.enable = false;
systemd.enable = true;
# niri = {
# enableKeybinds = false; # Sets static preset keybinds
# # enableSpawn = true; # Auto-start DMS with niri, if enabled