Skip to content

Commit

Permalink
conditional solution to dri32support
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Aug 30, 2024
1 parent d913ff6 commit 8adbdc3
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions modules/nixos/desktop/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@
# For further configuration extention, please refer to:
# https://wiki.nixos.org/wiki/GNOME
# =================================
{ pkgs, ... }: {
{ pkgs, ... }:
let
isAarch64 = builtins.currentSystem == "aarch64";

x86_64-opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
}

aarch64-opengl = {
enable = true;
driSupport = true;
};

opengl = if isAarch64 then aarch64-opengl else x86_64-opengl;
in
{
config = {
# Sum additional variables for system-wide use.
environment.variables = {
Expand Down Expand Up @@ -110,11 +127,7 @@
};

# Make sure opengl is enabled
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
hardware.opengl = opengl;

# Exclude some packages from the Gnome desktop environment.
environment.gnome.excludePackages =
Expand Down

0 comments on commit 8adbdc3

Please sign in to comment.