open files with external programs for neomutt
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
slurp
|
||||
wireshark
|
||||
brightnessctl
|
||||
mailcap
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user