Move some graphics bits into the graphics role.

This commit is contained in:
Tom Alexander 2025-01-18 11:00:30 -05:00
parent 41138ab34a
commit 4f0024c4f9
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 32 additions and 24 deletions

View File

@ -136,9 +136,6 @@
file file
usbutils # for lsusb usbutils # for lsusb
pciutils # for lspci pciutils # for lspci
mesa-demos # for glxgears TODO move to better role
vulkan-tools # for vkcube TODO move to better role
xorg.xeyes # to test which windows are using x11 TODO move to better role
ripgrep ripgrep
strace strace
ltrace ltrace

View File

@ -8,5 +8,36 @@
{ {
imports = [ ]; imports = [ ];
hardware.graphics.enable = true; options.me.graphicsCardType = 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;
})
]
);
} }

View File

@ -21,26 +21,6 @@ in
{ {
imports = [ ]; imports = [ ];
options.me.graphicsCardType = 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 = ( config = (
lib.mkMerge [ lib.mkMerge [
{ {