add gpu option to mpv wrapper
This commit is contained in:
parent
3c1ac52780
commit
dbc53ceeba
2 changed files with 15 additions and 4 deletions
|
@ -151,7 +151,10 @@
|
|||
};
|
||||
};
|
||||
foot.enable = true;
|
||||
mpv.enable = true;
|
||||
mpv = {
|
||||
enable = true;
|
||||
gpu = "AMD Radeon RX 6800M (RADV NAVI22)";
|
||||
};
|
||||
neovim.enable = true;
|
||||
zathura.enable = true;
|
||||
hypr = {
|
||||
|
|
|
@ -7,9 +7,17 @@
|
|||
cfg = config.myOptions.programs.mpv;
|
||||
inherit (config.myOptions.other.system) username;
|
||||
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (lib) mkEnableOption mkIf mkOption;
|
||||
inherit (lib.types) nullOr str;
|
||||
in {
|
||||
options.myOptions.programs.mpv.enable = mkEnableOption "mpv";
|
||||
options.myOptions.programs.mpv = {
|
||||
enable = mkEnableOption "mpv";
|
||||
gpu = mkOption {
|
||||
description = "gpu used to render videos played through mpv";
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
|
@ -19,7 +27,7 @@ in {
|
|||
vo = "gpu-next";
|
||||
hwdec = "auto";
|
||||
gpu-api = "vulkan";
|
||||
vulkan-device = "AMD Radeon RX 6800M (RADV NAVI22)";
|
||||
vulkan-device = mkIf (cfg.gpu != null) cfg.gpu;
|
||||
volume = 50;
|
||||
osc = "no";
|
||||
osd-bar = "no";
|
||||
|
|
Loading…
Reference in a new issue