refactor(treewide)

This commit is contained in:
ooks-io 2024-06-11 22:37:17 +12:00
parent 25d48ac2ac
commit c4fc882042
99 changed files with 634 additions and 477 deletions

View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
let
gpu = config.ooknet.host.hardware.gpu;
inherit (lib) mkIf mkDefault;
inherit (builtins) elem;
in
{
config = mkIf (elem gpu.type ["amd"]) {
hardware.opengl = {
extraPackages = with pkgs; [
vulkan-tools
vulkan-loader
vulkan-extension-layer
vulkan-validation-layers
# amdvlk
mesa
];
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
};
boot = {
initrd.kernelModules = ["amdgpu"];
kernelModules = ["amdgpu"];
};
environment.systemPackages = [ pkgs.nvtopPackages.amd ];
services.xserver.videoDrivers = mkDefault ["modesetting" "amdgpu"];
};
}