Switches to uwsm for Hyprland session setup, WIP portals config needs cleanup

- Disables systemd management in favor of uwsm
- Updates environment variables for Wayland and portal support
- Adds xdg-desktop-portal packages to dependencies
- Adjusts greetd and Wayland configuration for uwsm integration
This commit is contained in:
Chris Toph 2025-04-14 13:50:59 -04:00
parent 81d5517506
commit 99cd170ffe
5 changed files with 29 additions and 15 deletions

View file

@ -11,30 +11,40 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
# withUWSM = true; # One day, but not today systemd.enable = false; # using withUWSM
package = null;
portalPackage = null;
systemd = { # systemd = {
enable = true; # enable = true;
variables = [ "--all" ]; # variables = [ "--all" ];
extraCommands = lib.mkBefore [ # extraCommands = lib.mkBefore [
"systemctl --user stop graphical-session.target" # "systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target" # "systemctl --user start hyprland-session.target"
]; # ];
}; # };
settings = { settings = {
## Environment Vars ## ## Environment Vars ##
env = [ env = [
"NIXOS_XDG_OPEN_USE_PORTAL, 1" # for xdg-open to use portal
"NIXOS_OZONE_WL, 1" # for ozone-based and electron apps to run on wayland "NIXOS_OZONE_WL, 1" # for ozone-based and electron apps to run on wayland
"MOZ_ENABLE_WAYLAND, 1" # for firefox to run on wayland "MOZ_ENABLE_WAYLAND, 1" # for firefox to run on wayland
"MOZ_WEBRENDER, 1" # for firefox to run on wayland "MOZ_WEBRENDER, 1" # for firefox to run on wayland
"XDG_SESSION_TYPE,wayland" "XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"XDG_CURRENT_DESKTOP,Hyprland"
"WLR_NO_HARDWARE_CURSORS,1" "WLR_NO_HARDWARE_CURSORS,1"
"WLR_RENDERER_ALLOW_SOFTWARE,1" "WLR_RENDERER_ALLOW_SOFTWARE,1"
"QT_QPA_PLATFORM,wayland" "QT_QPA_PLATFORM,wayland"
"GTK_USE_PORTAL,1"
"HYPRCURSOR_THEME,rose-pine-hyprcursor" # this will be better than default for now "HYPRCURSOR_THEME,rose-pine-hyprcursor" # this will be better than default for now
]; ];
xwayland = {
force_zero_scaling = true;
};
## Monitor ## ## Monitor ##
monitor = ( monitor = (

View file

@ -42,6 +42,9 @@
## Productivity ## ## Productivity ##
gimp gimp
inkscape inkscape
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
; ;
}; };

View file

@ -10,7 +10,7 @@
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
# withUWSM = true; # One day, but not today withUWSM = true;
}; };
environment.systemPackages = [ environment.systemPackages = [

View file

@ -13,11 +13,12 @@
let let
hostSpec = config.hostSpec.username; hostSpec = config.hostSpec.username;
default = { default = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --time --time-format '%I:%M %p | %a %h | %F' --cmd Hyprland"; command = "${pkgs.greetd.tuigreet}/bin/tuigreet --asterisks --time --time-format '%I:%M %p | %a %h | %F' --cmd uwsm start hyprland.desktop";
user = "toph"; user = "toph";
}; };
initial = { initial = {
command = "${pkgs.hyprland}/bin/Hyprland"; # command = "${pkgs.hyprland}/bin/Hyprland";
command = "uwsm start hyprland.desktop";
user = "toph"; user = "toph";
}; };
in in

View file

@ -14,9 +14,9 @@
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland # pkgs.xdg-desktop-portal-hyprland
]; ];
configPackages = [ pkgs.hyprland ]; # configPackages = [ pkgs.hyprland ];
config.common.default = "*"; # config.common.default = "*";
}; };
} }