Move nvidia into an option
This commit is contained in:
parent
5a778a6939
commit
f2c8234a58
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./dvd
|
||||
./nvidia
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.hardware.az_nvidia;
|
||||
in
|
||||
{
|
||||
environment = {
|
||||
variables = {
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
options = {
|
||||
hardware.az_nvidia.enable = lib.mkEnableOption "Nvidia GPU Support";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment = {
|
||||
variables = {
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
||||
intelBusId = "PCI:00:02:0";
|
||||
|
||||
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
||||
nvidiaBusId = "PCI:01:00:0";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
||||
intelBusId = "PCI:00:02:0";
|
||||
|
||||
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
||||
nvidiaBusId = "PCI:01:00:0";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
custom.inputs.nixos-hardware.nixosModules.common-gpu-nvidia
|
||||
custom.inputs.nixos-hardware.nixosModules.common-gpu-intel
|
||||
"${custom.inputs.self}/hardware/bluetooth"
|
||||
"${custom.inputs.self}/hardware/nvidia"
|
||||
(import "${custom.inputs.self}/modules/desktop" { inherit custom; })
|
||||
"${custom.inputs.self}/modules/logs-share"
|
||||
(import "${custom.inputs.self}/modules/restic-client-desktop" { inherit custom; })
|
||||
|
@ -51,6 +50,7 @@
|
|||
];
|
||||
|
||||
hardware = {
|
||||
az_nvidia.enable = true;
|
||||
dvd.enable = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue