play around with vaapi
This commit is contained in:
@@ -19,6 +19,7 @@ in {
|
|||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
|
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
@@ -28,7 +29,8 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
in lib.mkIf cfg.enable (lib.recursiveUpdate nvidiaOption {
|
in lib.mkIf cfg.enable (lib.recursiveUpdate nvidiaOption {
|
||||||
boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
|
boot.kernelParams =
|
||||||
|
[ "nvidia-drm.fbdev=1" "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
services.xserver.deviceSection = ''
|
services.xserver.deviceSection = ''
|
||||||
Option "Coolbits" "24"
|
Option "Coolbits" "24"
|
||||||
@@ -72,9 +74,19 @@ in {
|
|||||||
#};
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vaapiVdpau
|
||||||
|
libvdpau-va-gl
|
||||||
|
libva
|
||||||
|
libva-utils
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.nvpl = lib.mkIf cfg.powerLimit.enable {
|
systemd.services.nvpl = lib.mkIf cfg.powerLimit.enable {
|
||||||
description = "Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
description =
|
||||||
script = "/run/current-system/sw/bin/nvidia-smi -pl=${toString cfg.powerLimit.wattage}";
|
"Increase GPU power limit to ${toString cfg.powerLimit.wattage} watts";
|
||||||
|
script = "/run/current-system/sw/bin/nvidia-smi -pl=${
|
||||||
|
toString cfg.powerLimit.wattage
|
||||||
|
}";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ in {
|
|||||||
path = "${cfg.basePath}/no_backup";
|
path = "${cfg.basePath}/no_backup";
|
||||||
devices = [ "kop-pc" "server" "laptop" "mini-pc" "mini-pc-proxmox" ];
|
devices = [ "kop-pc" "server" "laptop" "mini-pc" "mini-pc-proxmox" ];
|
||||||
};
|
};
|
||||||
|
folders."emu" = {
|
||||||
|
id = "emu";
|
||||||
|
path = "${cfg.basePath}/emu";
|
||||||
|
devices = [ "kop-pc" "server" "mini-pc" "mini-pc-proxmox" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
ssd.enable = true;
|
ssd.enable = true;
|
||||||
wooting.enable = true;
|
wooting.enable = true;
|
||||||
};
|
};
|
||||||
|
misc = {
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
graphical = {
|
graphical = {
|
||||||
audio.enable = true;
|
audio.enable = true;
|
||||||
sddm.enable = true;
|
sddm.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user