diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 76ac68a..d909d55 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -7,45 +7,13 @@ let isMacbook = config.networking.hostName == "FredOS-Macbook"; isGaming = !isMacbook; - # hyprutils-0.13.1 requires GLIBCXX_3.4.34 (GCC 15) but Hyprland's RPATH - # was patched to gcc-14.3.0-lib which only provides up to GLIBCXX_3.4.33. - # Use our nixpkgs GCC 15 to supply the missing symbol via LD_PRELOAD. - gcc15-stdlib = pkgs.gcc15.cc.lib; - - hyprland-wrapped = pkgs.symlinkJoin { - name = hyprland-pkgs.hyprland.name; - version = hyprland-pkgs.hyprland.version; - paths = [ hyprland-pkgs.hyprland ]; - nativeBuildInputs = [ pkgs.makeWrapper ]; - # passthru inside symlinkJoin flows through runCommand → mkDerivation, - # which correctly sets drv.passthru. The display manager requires - # providedSessions; HM's hyprland module requires override. - passthru = { - providedSessions = [ "hyprland" ]; - override = _: hyprland-wrapped; - }; - postBuild = '' - wrapProgram $out/bin/start-hyprland \ - --set LD_PRELOAD "${gcc15-stdlib}/lib/libstdc++.so.6" - wrapProgram $out/bin/Hyprland \ - --set LD_PRELOAD "${gcc15-stdlib}/lib/libstdc++.so.6" - - # The session .desktop symlinks to the original package and contains - # its absolute store path. Rewrite Exec= to our wrapped binary so - # GDM actually launches the LD_PRELOAD wrapper, not the bare binary. - desktop=$out/share/wayland-sessions/hyprland.desktop - orig=$(readlink -f "$desktop") - rm "$desktop" - sed "s|^Exec=.*|Exec=$out/bin/start-hyprland|" "$orig" > "$desktop" - ''; - }; in { config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) { programs.hyprland = { enable = true; xwayland.enable = true; - package = hyprland-wrapped; + package = hyprland-pkgs.hyprland; portalPackage = hyprland-pkgs.xdg-desktop-portal-hyprland; }; @@ -125,7 +93,7 @@ in enable = true; configType = "lua"; systemd.variables = [ "--all" ]; - package = hyprland-wrapped; + package = hyprland-pkgs.hyprland; settings = { # hl.config({...}) — all static named-section configuration. @@ -249,7 +217,6 @@ in in '' -- Environment - hl.env("LD_PRELOAD", "") hl.env("XCURSOR_THEME", "Bibata-Modern-Ice") hl.env("XCURSOR_SIZE", "24") hl.env("HYPRCURSOR_THEME", "Bibata-Modern-Ice")