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