feat: improve GPU support for modules
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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''
|
||||
|
||||
@@ -17,7 +17,14 @@ in {
|
||||
./shell
|
||||
];
|
||||
|
||||
options.home.fullDesktop = mkEnableOption "Enable most modules";
|
||||
options.home = {
|
||||
fullDesktop = mkEnableOption "Enable most modules";
|
||||
gpuType = mkOption {
|
||||
type = types.nullOr (types.enum ["nvidia" "amd" "intel"]);
|
||||
default = null;
|
||||
example = "amd";
|
||||
};
|
||||
};
|
||||
config.home = {
|
||||
cli.fullDesktop = mkDefault cfg.fullDesktop;
|
||||
desktop.fullDesktop = mkDefault cfg.fullDesktop;
|
||||
|
||||
@@ -59,7 +59,9 @@ in {
|
||||
};
|
||||
tray.compact = true;
|
||||
};
|
||||
services.gpuType = "amd";
|
||||
services = mkIf (config.home.gpuType != null) {
|
||||
inherit (config.home) gpuType;
|
||||
};
|
||||
session.commands = {
|
||||
logout = ["uwsm" "stop"];
|
||||
shutdown = ["systemctl" "poweroff"];
|
||||
|
||||
@@ -15,7 +15,7 @@ in {
|
||||
force-seekable = true; # force streams to be seekable
|
||||
slang = "jpn,jp,eng,en,fra,fr";
|
||||
alang = "eng,en,fra,fr";
|
||||
gpu-api = "vulkan";
|
||||
gpu-api = "auto";
|
||||
osc = true;
|
||||
profile = "gpu-hq";
|
||||
# geometry = "50%x50%";
|
||||
|
||||
Reference in New Issue
Block a user