initial graphana

This commit is contained in:
mjallen18
2024-02-27 15:11:46 -06:00
parent 872b36becf
commit 58fb2f1810
5 changed files with 127 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.hardware.gpu.amd;
in {
kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
# Configure programs
programs = { corectrl.enable };
# Configure environment
environment = {
# Force radv
variables.AMD_VULKAN_ICD = "RADV";
};
# Hardware configs
hardware = {
# Enable OpenGL
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
}

View File

@@ -0,0 +1,9 @@
{ lib, ... }:
with lib;
{
options.hardware.gpu.amd = {
enable = mkEnableOption "amd hardware config";
};
}

View File

@@ -0,0 +1,42 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.hardware.gpu.nvidia;
in {
hardware = {
# Nvidia
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta;
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
};
# Enable OpenGL
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
}

View File

@@ -0,0 +1,8 @@
{ lib, ... }:
with lib;
{
options.hardware.gpu.nvidia = {
enable = mkEnableOption "nvidia hardware config";
};
}