From 6a528854030bbffda93ac6a75ae551957696ae0e Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 30 Jan 2023 19:15:51 +0100 Subject: [PATCH] feat(nvim): close buffers with gq --- home-manager/email.nix | 125 ++++++++++++++++++++++++++++++++ home-manager/neovim/keymaps.lua | 2 +- 2 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 home-manager/email.nix diff --git a/home-manager/email.nix b/home-manager/email.nix new file mode 100644 index 0000000..ea5ad54 --- /dev/null +++ b/home-manager/email.nix @@ -0,0 +1,125 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = [ pkgs.libsecret ]; + + programs.msmtp.enable = true; + programs.mbsync.enable = true; + programs.neomutt = { + enable = true; + sidebar.enable = true; + vimKeys = true; + macros = [ + { + action = "mbsync -all"; + key = "S"; + map = [ "index" ]; + } + ]; + }; + + accounts.email = { + maildirBasePath = "${config.xdg.dataHome}/mail"; + + accounts = { + molez = rec { + primary = true; + + realName = "Michael Mandl"; + address = "mandlm@molez.net"; + + userName = address; + passwordCommand = "secret-tool lookup email mandlm@molez.net"; + + imap = { + host = "mail.molez.net"; + port = 993; + tls.enable = true; + }; + + smtp = { + host = "mail.molez.net"; + port = 465; + tls.enable = true; + }; + + gpg = { + key = "0x4AA25D647AA54CC7"; + signByDefault = true; + }; + + msmtp.enable = true; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + + neomutt.enable = true; + }; + swp = { + realName = "Michael Mandl"; + address = "mandl@vi-bim.de"; + + userName = "mandl"; + passwordCommand = "secret-tool lookup email mandl@vi-bim.de"; + + imap = { + host = "swpmail.softwareparadies.de"; + port = 993; + tls.enable = true; + }; + + smtp = { + host = "swpmail.softwareparadies.de"; + port = 465; + tls.enable = true; + }; + + gpg = { + key = "0x4E60F44227F611B4 "; + signByDefault = true; + }; + + signature = { + showSignature = "append"; + text = '' + -- + Mit freundlichen Grüßen + + Michael Mandl + Entwicklung + ------------------------------------------ + swp software systems GmbH & Co. KG + + Königsbrücker Straße 124 + 01099 Dresden + Tel: 0351-492850 + Fax: 0351-4928550 + www: https://www.vi-bim.de + + Kennen Sie schon unsere FAQ-Wissensdatenbank? Einfach hier klicken: + https://faq.vi-bim.de + + Unsere Datenschutzerklärung finden Sie unter https://datenschutz.vi-bim.de + + Registergericht: Amtsgericht Dresden HRA 3008 + persönlich haftender Gesellschafter: + swp Beteiligungs GmbH + Registergericht: Amtsgericht Dresden HRB 15 20 9 + Geschäftsführer: Holger Schönemann, Stefan Urlberger + ''; + }; + + msmtp.enable = true; + mbsync = { + enable = true; + create = "both"; + expunge = "both"; + }; + + neomutt.enable = true; + }; + }; + }; +} diff --git a/home-manager/neovim/keymaps.lua b/home-manager/neovim/keymaps.lua index 68b1150..ee3d090 100644 --- a/home-manager/neovim/keymaps.lua +++ b/home-manager/neovim/keymaps.lua @@ -61,7 +61,7 @@ vim.api.nvim_create_autocmd("TermOpen", { }) -- buffer closing -nnoremap("q", ":Bdelete") +nnoremap("gq", ":Bdelete") -- toggle search highlighting vim.cmd('nnoremap * v:hlsearch ? ":nohlsearch" : "*"')