update dhardware configs

This commit is contained in:
Aly Raffauf 2024-04-05 23:12:46 -04:00
parent 881e25b777
commit e176d95550
6 changed files with 64 additions and 27 deletions

View file

@ -14,16 +14,6 @@
services.xserver = {
# Prevent system sleep after reboot to login screen.
displayManager.gdm.autoSuspend = false;
# Add AMDGPU driver.
videoDrivers = [ "amdgpu" ];
};
hardware.opengl = {
# Add ROCM annd AMD Vulkan driver.
extraPackages = with pkgs; [ rocmPackages.clr.icd amdvlk ];
# Add support for 32bit apps.
driSupport32Bit = true;
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
};
systemConfig = {

View file

@ -1,6 +1,3 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
@ -9,9 +6,23 @@
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.kernelModules = [ "kvm-amd" "amdgpu"];
boot.extraModulePackages = [ ];
services.xserver = {
# Add AMDGPU driver.
videoDrivers = [ "amdgpu" ];
};
hardware.opengl = {
enable = true;
# Add ROCM annd AMD Vulkan driver.
extraPackages = with pkgs; [ rocmPackages.clr.icd amdvlk ];
# Add support for 32bit apps.
driSupport32Bit = true;
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/c4217c88-3101-434b-8321-58e2ac89527c";
fsType = "ext4";

View file

@ -68,11 +68,6 @@ in {
networking.hostName = "petalburg"; # Define your hostname.
hardware.sensor.iio.enable = true;
powerManagement.powertop.enable = true;
services.thermald.enable = true;
environment.systemPackages = [ cs-adjuster cs-adjuster-plasma pp-adjuster ];
desktopConfig = {

View file

@ -1,6 +1,3 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
@ -12,6 +9,33 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# Intel drivers with accelerated video playback support.
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver =
pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
}; # Force intel-media-driver
# Enable auto-rotate and tablet mode.
hardware.sensor.iio.enable = true;
# Save power/better manage heat & fans.
powerManagement.powertop.enable = true;
services.thermald.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/ed744c02-8854-4f1a-8e75-ed15f02775e3";
fsType = "ext4";

View file

@ -42,8 +42,6 @@
networking.hostName = "rustboro"; # Define your hostname.
powerManagement.cpuFreqGovernor = "ondemand";
systemConfig = {
plymouth.enable = true;
zramSwap = {

View file

@ -1,6 +1,3 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
@ -21,6 +18,28 @@
fileSystems."/persist" = { neededForBoot = true; };
# Otherwise, CPU doesn't automatically clock down.
powerManagement.cpuFreqGovernor = "ondemand";
# Intel drivers with accelerated video playback support.
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver =
pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
}; # Force intel-media-driver
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";