hyprland: use unstable opengl when on stable
This commit is contained in:
parent
6fd1d3ccb7
commit
e58f3ca129
@ -16,9 +16,9 @@ in
|
|||||||
description = "Whether to use the Hyprland flake package";
|
description = "Whether to use the Hyprland flake package";
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
# enable if not on nixpkgs stable
|
# enable if not on nixpkgs stable
|
||||||
defaultText = "config.nixfiles.nixpkgs != inputs.nixpkgs";
|
# defaultText = "config.nixfiles.nixpkgs != inputs.nixpkgs";
|
||||||
default = config.nixfiles.nixpkgs != inputs.nixpkgs;
|
default = true;
|
||||||
example = true;
|
example = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -46,6 +46,16 @@ in
|
|||||||
package = lib.mkIf cfg.useFlake flake-package;
|
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 [
|
environment.variables = lib.mkMerge [
|
||||||
{
|
{
|
||||||
# NIXOS_OZONE_WL = "1"; # this is breaking things for some reason
|
# NIXOS_OZONE_WL = "1"; # this is breaking things for some reason
|
||||||
|
Loading…
x
Reference in New Issue
Block a user