From e58f3ca129b82680f95ae06dbfe4529d448eec94 Mon Sep 17 00:00:00 2001 From: NullBite Date: Sun, 31 Mar 2024 16:57:27 -0400 Subject: [PATCH] hyprland: use unstable opengl when on stable --- system/sessions/hyprland.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/system/sessions/hyprland.nix b/system/sessions/hyprland.nix index 41613ec..a0df294 100644 --- a/system/sessions/hyprland.nix +++ b/system/sessions/hyprland.nix @@ -16,9 +16,9 @@ in description = "Whether to use the Hyprland flake package"; type = lib.types.bool; # enable if not on nixpkgs stable - defaultText = "config.nixfiles.nixpkgs != inputs.nixpkgs"; - default = config.nixfiles.nixpkgs != inputs.nixpkgs; - example = true; + # defaultText = "config.nixfiles.nixpkgs != inputs.nixpkgs"; + default = true; + example = false; }; }; @@ -46,6 +46,16 @@ in package = lib.mkIf cfg.useFlake flake-package; }; + hardware.opengl = let + hyprland-pkgs = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.system}; + hyprlandMesa = hyprland-pkgs.mesa.drivers; + hyprlandMesa32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers; + useHyprlandMesa = cfg.useFlake && (config.nixfiles.nixpkgs == inputs.nixpkgs); + in lib.mkIf useHyprlandMesa { + package = hyprlandMesa; + package32 = hyprlandMesa32; + }; + environment.variables = lib.mkMerge [ { # NIXOS_OZONE_WL = "1"; # this is breaking things for some reason