mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 13:22:04 +00:00
37 lines
708 B
Nix
37 lines
708 B
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
cfg = config.nmasur.presets.programs.zathura;
|
||
|
in
|
||
|
|
||
|
{
|
||
|
|
||
|
options.nmasur.presets.programs.zathura.enable = lib.mkEnableOption "Zathura PDF viewer";
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
home.packages = with pkgs; [
|
||
|
zathura # PDF viewer
|
||
|
];
|
||
|
# Set default program for opening PDFs
|
||
|
xdg.mimeApps = {
|
||
|
associations.added = {
|
||
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||
|
};
|
||
|
associations.removed = {
|
||
|
"application/pdf" = [
|
||
|
"mupdf.desktop"
|
||
|
"wine-extension-pdf.desktop"
|
||
|
];
|
||
|
};
|
||
|
defaultApplications = {
|
||
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|