Convert MPV configuration to module
This commit is contained in:
parent
e2df40e518
commit
d48773e9af
5 changed files with 26 additions and 6 deletions
|
@ -1,5 +0,0 @@
|
||||||
_: {
|
|
||||||
programs.mpv = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -2,6 +2,7 @@
|
||||||
config.modules = {
|
config.modules = {
|
||||||
application = {
|
application = {
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
|
mpv.enable = true;
|
||||||
};
|
};
|
||||||
cli.neovim.enable = true;
|
cli.neovim.enable = true;
|
||||||
cli.vifm.enable = true;
|
cli.vifm.enable = true;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
./desktop/sway
|
./desktop/sway
|
||||||
./gaming/lutris
|
./gaming/lutris
|
||||||
./video/kdenlive
|
./video/kdenlive
|
||||||
|
./video/mpv
|
||||||
./web/firefox
|
./web/firefox
|
||||||
./web/qutebrowser/default.nix
|
./web/qutebrowser/default.nix
|
||||||
./web/webcord
|
./web/webcord
|
||||||
|
|
24
modules/home-manager/video/mpv/default.nix
Normal file
24
modules/home-manager/video/mpv/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.modules.video.mpv;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.video.mpv = {
|
||||||
|
enable = mkEnableOption "enable MPV video player";
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.mpv = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
hwdec = auto-safe;
|
||||||
|
vo = gpu;
|
||||||
|
profile = gpu-hq;
|
||||||
|
gpu-context = wayland;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg.mimeApps.defaultApplications = {
|
||||||
|
"video/*" = "mpv.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -67,7 +67,6 @@
|
||||||
] ++ (if hostConfig.desktop then
|
] ++ (if hostConfig.desktop then
|
||||||
[
|
[
|
||||||
../home-manager/foot.nix
|
../home-manager/foot.nix
|
||||||
../home-manager/mpv
|
|
||||||
]
|
]
|
||||||
else []
|
else []
|
||||||
) ++ lib.optional (
|
) ++ lib.optional (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue