2025-02-08 16:06:57 -05:00

49 lines
1.1 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
options.me.graphics_card_type = lib.mkOption {
type = lib.types.nullOr (
lib.types.enum [
"amd"
"intel"
"nvidia"
]
);
default = null;
example = "amd";
description = "What graphics card type is in the computer.";
};
options.me.graphical = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install graphical programs.";
};
config = (
lib.mkMerge [
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
mesa-demos # for glxgears
vulkan-tools # for vkcube
xorg.xeyes # to test which windows are using x11
];
hardware.graphics.enable = true;
# hardware.graphics.enable32Bit = true;
# Vulkan Support (64-bit is enabled by default, 32-bit is disabled by default)
# hardware.opengl.driSupport = true; # This is already enabled by default
# hardware.opengl.driSupport32Bit = true; # For 32 bit applications
})
]
);
}