1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-23 10:09:44 +01:00

Reusing modules

This commit is contained in:
suliman 2022-12-28 23:10:35 +03:00
parent 485f3bc2f2
commit 2e8fce47c8

View file

@ -1,36 +1,24 @@
{ lib, pkgs, ... }:
{
boot.initrd.kernelModules = [
"amdgpu"
"ideapad_laptop"
imports = [
../../../thinkpad/yoga.nix
../../../../common/gpu/amd/default.nix
];
services.xserver.videoDrivers = [ "amdgpu" ];
boot.initrd.kernelModules = [ "ideapad_laptop" ];
hardware.opengl.extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
amdvlk
vaapiVdpau
libvdpau-va-gl
];
hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
hardware.opengl = {
driSupport = lib.mkDefault true;
driSupport32Bit = lib.mkDefault true;
};
environment.variables.AMD_VULKAN_ICD = lib.mkDefault "RADV";
# Latest Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
# energy savings
hardware.bluetooth.powerOnBoot = lib.mkDefault false;
services.power-profiles-daemon.enable = false;
services.tlp.enable = lib.mkDefault true;
# automatic screen orientation, only works in X11
hardware.sensor.iio.enable = true;
# energy savings
boot.kernelParams = ["mem_sleep_default=deep" "pcie_aspm.policy=powersupersave"];
powerManagement.enable = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";