diff --git a/common/desktop_environment/gnome/default.nix b/common/desktop_environment/gnome/default.nix index 0f62964..9f36b57 100644 --- a/common/desktop_environment/gnome/default.nix +++ b/common/desktop_environment/gnome/default.nix @@ -59,7 +59,6 @@ with lib; gnome-tweaks wayland wayland-utils - # xwayland wl-clipboard numix-cursor-theme gnomeExtensions.vertical-workspaces diff --git a/common/desktop_environment/hyprland/default.nix b/common/desktop_environment/hyprland/default.nix index 7a60391..bbf4d0e 100644 --- a/common/desktop_environment/hyprland/default.nix +++ b/common/desktop_environment/hyprland/default.nix @@ -70,8 +70,10 @@ with lib; wl-clipboard wl-clip-persist wofi # application launcher - nemo # file manager - feh # image viewer + nemo # file manager (x11) + # nautilus # file manager + feh # image viewer (x11) + # imv # image viewer networkmanager # network management upower # power management brightnessctl # screen/keyboard brightness control @@ -91,13 +93,26 @@ with lib; programs.hyprland = { enable = true; - # xwayland.enable = true; + # xwayland.enable = false; withUWSM = true; # set the flake package package = hyprlandPkgs.hyprland; # make sure to also set the portal package, so that they are in sync - portalPackage = hyprlandPkgs.xdg-desktop-portal-hyprland; + # This is set below now in xdf portal directly so we can also add things like gtk + # portalPackage = hyprlandPkgs.xdg-desktop-portal-hyprland; + }; + + xdg.portal = { + enable = true; + extraPortals = lib.mkForce [ + hyprlandPkgs.xdg-desktop-portal-hyprland + hyprlandPkgs.xdg-desktop-portal-gtk + ]; + config.common.default = [ + "hyprland" + "gtk" + ]; }; hardware.graphics = { @@ -110,14 +125,20 @@ with lib; # Environment variables environment.sessionVariables = { - NIXOS_OZONE_WL = "1"; GTK_THEME = "Adwaita:dark"; XDG_SESSION_TYPE = "wayland"; XDG_CURRENT_DESKTOP = "Hyprland"; XDG_SESSION_DESKTOP = "Hyprland"; - ELECTRON_OZONE_PLATFORM_HINT = "wayland"; - CLUTTER_BACKEND = "wayland"; WLR_RENDERER = "vulkan"; + + # Tell apps to run native wayland + NIXOS_OZONE_WL = "1"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; + GDK_BACKEND = "wayland,x11"; # GTK + QT_QPA_PLATFORM = "wayland;xcb"; # Qt 5/6 + MOZ_ENABLE_WAYLAND = "1"; # Firefox + SDL_VIDEODRIVER = "wayland"; # SDL apps/games + CLUTTER_BACKEND = "wayland"; # You already have this }; # Qt theming diff --git a/common/desktop_environment/hyprland/home_manager/hyprland.nix b/common/desktop_environment/hyprland/home_manager/hyprland.nix index 13929e6..dc17934 100644 --- a/common/desktop_environment/hyprland/home_manager/hyprland.nix +++ b/common/desktop_environment/hyprland/home_manager/hyprland.nix @@ -16,13 +16,17 @@ in { wayland.windowManager.hyprland = { enable = true; - plugins = with hyprlandPkgs.hyprlandPlugins; [ - hyprspace - ]; + xwayland.enable = osConfig.programs.hyprland.xwayland.enable; + # plugins = with hyprlandPkgs.hyprlandPlugins; [ + # hyprspace + # ]; settings = lib.attrsets.recursiveUpdate { # Debug logs enabled when this is uncommented - "debug:disable_logs" = false; + debug.disable_logs = false; + debug.disable_time = false; + + exec-once = [ "pgrep waybar>/dev/null || waybar" ]; # Default monitor configuration monitor = "monitor = , preferred, auto, 1"; @@ -144,7 +148,7 @@ in bindr = [ # overview - "$mainMod, SUPER_L, overview:toggle" + # "$mainMod, SUPER_L, overview:toggle" $ hyprspace plugin "$mainMod SHIFT, R, exec, systemctl --user restart hyprpanel.service" ]; diff --git a/common/programs/flatpaks.nix b/common/programs/flatpaks.nix index bc3beb6..5e5e7f5 100644 --- a/common/programs/flatpaks.nix +++ b/common/programs/flatpaks.nix @@ -32,14 +32,16 @@ in global = { Context.sockets = [ "wayland" - "x11" + "fallback-x11" ]; Environment = { XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; GTK_THEME = "Adwaita:dark"; # Force wayland as much as possible. - ELECTRON_OZONE_PLATFORM_HINT = "wayland"; # or 'auto' + ELECTRON_OZONE_PLATFORM_HINT = "auto"; # or 'auto' + GTK_USE_PORTAL = "1"; + OZONE_PLATFORM = "wayland"; }; }; "org.signal.Signal" = { @@ -52,6 +54,11 @@ in ]; }; }; + "com.google.Chrome" = { + Environment = { + CHROME_EXTRA_ARGS = "--enable-features=WaylandWindowDecorations --ozone-platform-hint=auto"; + }; + }; }; }; }; diff --git a/hosts/lio/flake.nix b/hosts/lio/flake.nix index 42da64a..76c7c54 100644 --- a/hosts/lio/flake.nix +++ b/hosts/lio/flake.nix @@ -114,7 +114,7 @@ enable = true; packages = [ "org.signal.Signal" - "com.discordapp.Discord" + "dev.vencord.Vesktop" "md.obsidian.Obsidian" "com.spotify.Client" "org.videolan.VLC" diff --git a/hosts/lio/hyprland_customizations.nix b/hosts/lio/hyprland_customizations.nix index 5af2228..d2e6d76 100644 --- a/hosts/lio/hyprland_customizations.nix +++ b/hosts/lio/hyprland_customizations.nix @@ -123,23 +123,23 @@ in ringofstorms_common.desktopEnvironment.hyprland.extraOptions = hyprlandExtraOptions; # User-level systemd service that follows your Hyprland session and watches for monitor changes - systemd.user.services.hyprland-move-workspaces = { - description = "Keep workspaces 1–6 on main and 7–10 on secondary; react to monitor changes"; - - # Start/stop with Hyprland specifically - wantedBy = [ "hyprland-session.target" ]; - after = [ "hyprland-session.target" ]; - partOf = [ "hyprland-session.target" ]; - bindsTo = [ "hyprland-session.target" ]; - # Only start once Hyprland's event socket exists - unitConfig.ConditionPathExistsGlob = "%t/hypr/*/.socket2.sock"; - - serviceConfig = { - Type = "simple"; - ExecStart = "${moveScript}/bin/hyprland-move-workspaces"; - Restart = "always"; - RestartSec = "2s"; - }; - }; + # systemd.user.services.hyprland-move-workspaces = { + # description = "Keep workspaces 1–6 on main and 7–10 on secondary; react to monitor changes"; + # + # # Start/stop with Hyprland specifically + # wantedBy = [ "hyprland-session.target" ]; + # after = [ "hyprland-session.target" ]; + # partOf = [ "hyprland-session.target" ]; + # bindsTo = [ "hyprland-session.target" ]; + # # Only start once Hyprland's event socket exists + # unitConfig.ConditionPathExistsGlob = "%t/hypr/*/.socket2.sock"; + # + # serviceConfig = { + # Type = "simple"; + # ExecStart = "${moveScript}/bin/hyprland-move-workspaces"; + # Restart = "always"; + # RestartSec = "2s"; + # }; + # }; }; }