feat: improve GPU support for modules

This commit is contained in:
2026-01-25 16:19:09 +01:00
parent b4a57a8f64
commit 21e85fc77b
6 changed files with 29 additions and 9 deletions

View File

@@ -1,10 +1,20 @@
{pkgs, ...}: {
{
pkgs,
config,
...
}: let
inherit (config.home) gpuType;
in {
programs.btop = {
enable = true;
package = pkgs.btop.override {
rocmSupport = true;
cudaSupport = true;
};
package =
if gpuType != null
then
pkgs.btop.override {
rocmSupport = gpuType == "amd";
cudaSupport = gpuType == "nvidia";
}
else pkgs.btop;
settings = {
color_theme = "${pkgs.btop}/share/btop/themes/nord.theme";
cpu_bottom = false;

View File

@@ -1,3 +1,3 @@
{pkgs, ...}:
pkgs.writeShellScriptBin "mp42webm" ''
${pkgs.ffmpeg}/bin/ffmpeg -i "$1" -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis "$1".webm''
${pkgs.ffmpeg}/bin/ffmpeg -i "$1" -c:v libvpx -crf 10 -b:v 1M -c:a -hwaccel=auto libvorbis "$1".webm''