dotfiles/modules/common/applications/media.nix

39 lines
907 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }: {
2022-04-29 02:43:50 +00:00
2022-12-21 21:18:03 +00:00
options = {
media = {
enable = lib.mkEnableOption {
description = "Enable media programs.";
default = false;
};
};
};
config = lib.mkIf (config.gui.enable && config.media.enable) {
home-manager.users.${config.user} = {
home.packages = with pkgs; [
mpv # Video viewer
sxiv # Image viewer
mupdf # PDF viewer
zathura # PDF viewer
];
# Set default for opening PDFs
xdg.mimeApps = {
associations.added = {
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
"image/*" = [ "sxiv.desktop" ];
};
associations.removed = { "application/pdf" = [ "mupdf.desktop" ]; };
defaultApplications = {
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
"image/*" = [ "sxiv.desktop" ];
};
};
};
2022-04-29 02:43:50 +00:00
};
}