From 40539ae163c966e19ff218d335141b382ac4d6f0 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 5 Feb 2026 00:25:04 +0100 Subject: [PATCH] prep roundcube, from ktiu.net, nvim stuff --- home/fish.nix | 4 ++++ home/mail/default.nix | 7 +++++-- home/nvim/config.vim | 20 ++++++++++++++++---- home/nvim/default.nix | 18 ++++++++++++------ system/mail-server/roundcube.nix | 21 +++++++++++++++++++-- 5 files changed, 56 insertions(+), 14 deletions(-) diff --git a/home/fish.nix b/home/fish.nix index 6570f73..b8fd587 100644 --- a/home/fish.nix +++ b/home/fish.nix @@ -53,6 +53,10 @@ end end + function diary --description 'Create or edit today\'s diary entry' + nvim -c "call Diary()" + end + set -U fish_prompt_pwd_dir_length 0 function fish_prompt --description "Write out the prompt" diff --git a/home/mail/default.nix b/home/mail/default.nix index cb69326..1eebf52 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -3,10 +3,13 @@ { programs.msmtp = { enable = true; - configContent = '' + configContent = lib.mkOrder 1200 '' defaults logfile ${config.xdg.stateHome}/msmtp/msmtp.log port 587 + + account ktiu : t9e + from *@ktiu.net ''; }; @@ -136,7 +139,7 @@ }; msmtp = { enable = true; - extraConfig.from = "*@(ktiu.net|t9e.me)"; + extraConfig.from = "*@t9e.me"; }; passwordCommand = "pass mail/arielle.ktiu.net"; }; diff --git a/home/nvim/config.vim b/home/nvim/config.vim index 2b3d0e5..5213e5f 100644 --- a/home/nvim/config.vim +++ b/home/nvim/config.vim @@ -23,6 +23,9 @@ set splitright set tabstop=2 set updatetime=300 +" set foldmethod=expr +" set foldexpr=nvim_treesitter#foldexpr() + let g:netrw_liststyle = 3 let g:netrw_fastbrowse = 0 @@ -48,8 +51,17 @@ xnoremap i% GoggV onoremap i% :normal vi% function CreateNote(title) - execute "file ~/notes/" . strftime("%Y-%m-%d") . "_" . join(split(tolower(a:title)), "_") . ".md" - execute "set ft=markdown" - execute "normal! i" . a:title - execute "normal V\yaml_note\" + execute "VimwikiIndex" + execute "VimwikiGoto " . a:title endfunction + +function Diary() + execute "VimwikiMakeDiaryNote" +endfunction + +" function CreateNote(title) +" execute "file ~/notes/" . strftime("%Y-%m-%d") . "_" . join(split(tolower(a:title)), "_") . ".md" +" execute "set ft=markdown" +" execute "normal! i" . a:title +" execute "normal V\yaml_note\" +" endfunction diff --git a/home/nvim/default.nix b/home/nvim/default.nix index 1cec2fb..c83d287 100644 --- a/home/nvim/default.nix +++ b/home/nvim/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: { home.packages = with pkgs; [ @@ -6,6 +6,7 @@ marksman nil typescript-language-server + vim-language-server ]; programs.neovim = { @@ -30,8 +31,9 @@ { plugin = fugitive; + type = "lua"; config = '' - nnoremap g :Git + vim.api.nvim_set_keymap("n", "g", ":Git", { noremap = true, silent = true }) ''; } @@ -43,9 +45,9 @@ vim.api.nvim_set_keymap('i', '', '(fzf-complete-word)', { silent = true }) vim.api.nvim_set_keymap('i', '', '(fzf-complete-line)', { silent = true }) - vim.api.nvim_set_keymap('n', '', '(fzf-maps-n)', { silent = true }) - vim.api.nvim_set_keymap('x', '', '(fzf-maps-x)', { silent = true }) - vim.api.nvim_set_keymap('o', '', '(fzf-maps-o)', { silent = true }) + vim.api.nvim_set_keymap('n', '', '(fzf-maps-n)', { silent = true }) + vim.api.nvim_set_keymap('x', '', '(fzf-maps-x)', { silent = true }) + vim.api.nvim_set_keymap('o', '', '(fzf-maps-o)', { silent = true }) vim.api.nvim_set_keymap('n', 'b', ':Buffers', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'o', ':Files', { noremap = true, silent = true }) @@ -107,11 +109,14 @@ vim.lsp.enable('r_language_server') vim.lsp.enable('texlab') vim.lsp.enable('ts_ls') + vim.lsp.enable('vimls') vim.api.nvim_del_keymap('i', '') ''; } + (nvim-treesitter.withPlugins (p: [ p.nix p.lua p.r p.typescript ])) + { plugin = papercolor-theme; config = '' @@ -155,10 +160,11 @@ { plugin = vim-pandoc; config = '' - let g:pandoc#modules#disabled = ["completion", "command", "menu", "completion"] + let g:pandoc#modules#disabled = ["completion", "command", "menu"] ''; } + vim-pandoc-syntax vim-repeat { diff --git a/system/mail-server/roundcube.nix b/system/mail-server/roundcube.nix index a8e704d..9379620 100644 --- a/system/mail-server/roundcube.nix +++ b/system/mail-server/roundcube.nix @@ -1,9 +1,15 @@ -{ config, pkgs, ... }: +{ config, lib, ... }: + +let + + webmailHostName = "webmail.${config.networking.domain}"; + +in { services.roundcube = { enable = true; - hostName = "webmail.ktiu.net"; + hostName = webmailHostName; extraConfig = '' $config['smtp_host'] = 'tls://%h'; $config['smtp_conn_options'] = [ @@ -14,4 +20,15 @@ ]; ''; }; + + # not sure why this is currently working w/o the following + # + # services.nginx.virtualHosts."${webmailHostName}" = { + # enableACME = lib.mkForce false; + # useACMEHost = config.networking.domain; + # }; + # security.acme.certs."${config.networking.domain}".extraDomainNames = [ + # webmailHostName + # ]; + }