open files with external programs for neomutt

This commit is contained in:
2026-04-16 20:23:18 +02:00
parent e0a1515495
commit cd66ebbd58
3 changed files with 19 additions and 1 deletions

View File

@@ -11,10 +11,21 @@
programs.mbsync.enable = true;
services.mbsync.enable = true;
home.file.".config/mailcap/config".text =
''
image/*; ${lib.getExe (builtins.getAttr "imv" pkgs)} %s
text/html; ${lib.getExe (builtins.getAttr config.home.sessionVariables.BROWSER pkgs)} %s
application/pdf; ${lib.getExe (builtins.getAttr "zathura" pkgs)} %s
'';
programs.neomutt = {
enable = true;
sidebar.enable = true;
vimKeys = true;
# https://github.com/nix-community/home-manager/issues/6185
# vimKeys = true;
settings = {
mailcap_path = "~/.config/mailcap/config";
};
};
accounts.email.maildirBasePath = "Mail";

View File

@@ -51,6 +51,12 @@
enable = true;
mime.enable = true;
mimeApps.enable = true;
mimeApps.defaultApplications = {
"application/pdf" = "zathura.desktop";
"image/*" = "imv.desktop";
"text/html" = "librewolf.desktop";
};
mimeApps.defaultApplicationPackages = with pkgs; [imv librewolf zathura];
userDirs.enable = true;
}
// lib.optionalAttrs (!stable) {

View File

@@ -87,6 +87,7 @@
slurp
wireshark
brightnessctl
mailcap
];
};