diff --git a/home/email.nix b/home/email.nix index a23b69d..1fe276d 100644 --- a/home/email.nix +++ b/home/email.nix @@ -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"; diff --git a/home/home.nix b/home/home.nix index 4181c46..b1b2735 100644 --- a/home/home.nix +++ b/home/home.nix @@ -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) { diff --git a/hosts/talos/configuration.nix b/hosts/talos/configuration.nix index 0634dd7..0e75fee 100644 --- a/hosts/talos/configuration.nix +++ b/hosts/talos/configuration.nix @@ -87,6 +87,7 @@ slurp wireshark brightnessctl + mailcap ]; };