2022-05-06 03:01:56 +00:00
|
|
|
{ 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) {
|
2023-02-17 23:14:57 +00:00
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
mpv # Video viewer
|
|
|
|
sxiv # Image viewer
|
|
|
|
mupdf # PDF viewer
|
|
|
|
zathura # PDF viewer
|
2023-03-08 23:14:30 +00:00
|
|
|
yt-dlp # Video downloader
|
2023-02-17 23:14:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Set default for opening PDFs
|
|
|
|
xdg.mimeApps.defaultApplications."application/pdf" =
|
|
|
|
[ "zathura.desktop" ];
|
|
|
|
xdg.mimeApps.defaultApplications."image/*" = [ "sxiv.desktop" ];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-04-29 02:43:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|