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 = "up", action = "fullscreen" })
hl.gesture({ fingers = 3, direction = "down", action = "fullscreen", mode = "maximize" }) 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() hl.on("hyprland.start", function()
local commands = { 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", "systemctl --user start hyprpolkitagent",
"otd-daemon", "otd-daemon",
"lorri daemon", "lorri daemon",
"/etc/pam_init",
"blueman-applet", "blueman-applet",
"udev-block-notify", "udev-block-notify",
"echo us > /tmp/kb_layout", "echo us > /tmp/kb_layout",
@ -112,7 +109,6 @@ hl.on("hyprland.start", function()
"easyeffects --gapplication-service", "easyeffects --gapplication-service",
"voxtype daemon", "voxtype daemon",
"openrgb --startminimized", "openrgb --startminimized",
"dms run",
} }
for _, command in ipairs(commands) do hl.exec_cmd(command) end for _, command in ipairs(commands) do hl.exec_cmd(command) end
end) end)

View file

@ -109,6 +109,7 @@
LC_TIME = "en_GB.UTF-8"; LC_TIME = "en_GB.UTF-8";
}; };
services.displayManager.sddm.enable = true; services.displayManager.sddm.enable = true;
services.displayManager.defaultSession = "hyprland-uwsm";
services.desktopManager.plasma6 = { services.desktopManager.plasma6 = {
enable = true; enable = true;
}; };
@ -227,6 +228,7 @@
# package = unstable-pkgs.hyprland; # package = unstable-pkgs.hyprland;
}; };
programs.uwsm.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [
@ -270,6 +272,29 @@
compositor.name = "hyprland"; # "niri" or "hyprland" or "sway" compositor.name = "hyprland"; # "niri" or "hyprland" or "sway"
configHome = "/home/dan"; 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 = { security.pam.services = {
greetd.kwallet = { greetd.kwallet = {
enable = true; enable = true;

View file

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