Vim, XDG, notmuch changes.

This commit is contained in:
kat witch 2021-03-14 02:56:41 +00:00
parent 6b566d6b94
commit a15204bf40
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
6 changed files with 51 additions and 52 deletions

View file

@ -3,9 +3,7 @@
{ {
programs.notmuch = { programs.notmuch = {
enable = true; enable = true;
hooks = { hooks = { preNew = "mbsync --all"; };
preNew = "mbsync --all";
};
}; };
programs.mbsync.enable = true; programs.mbsync.enable = true;
programs.msmtp.enable = true; programs.msmtp.enable = true;
@ -16,7 +14,10 @@
primary = true; primary = true;
realName = "kat witch"; realName = "kat witch";
userName = "kat@kittywit.ch"; userName = "kat@kittywit.ch";
passwordCommand = ''bitw -p gpg://${../../../private/files/master.gpg} get "kittywitch email"''; passwordCommand = ''
bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "kittywitch email"'';
msmtp.enable = true; msmtp.enable = true;
mbsync.enable = true; mbsync.enable = true;
mbsync.create = "maildir"; mbsync.create = "maildir";
@ -28,6 +29,6 @@
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE"; key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
}; };
}; };
}; };
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ]; programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
} }

View file

@ -24,11 +24,13 @@
#extraPython3Packages = (ps: with ps; [ jedi pylint ]); #extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; }; extraConfig = import ./vimrc.nix { inherit pkgs config; };
}; };
xdg.configFile = { xdg.dataFile = {
"vim/undo/.keep".text = ""; "vim/undo/.keep".text = "";
"vim/swap/.keep".text = ""; "vim/swap/.keep".text = "";
"vim/backup/.keep".text = ""; "vim/backup/.keep".text = "";
"nvim/coc-settings.json".text = builtins.readFile ./coc-settings.json; };
xdg.configFile = {
"vim/coc-settings.json".text = builtins.readFile ./coc-settings.json;
}; };
}; };
} }

View file

@ -1,15 +1,11 @@
{ config, pkgs }: { config, pkgs }:
'' ''
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
" unicode characters in the file autoload/float.vim
set encoding=utf-8
" Enable mouse " Enable mouse
set mouse=a set mouse=a
" notmuch! " notmuch!
let g:notmuch_config_file='${config.xdg.configHome}/notmuch/notmuchrc' let g:notmuch_config_file='$XDG_CONFIG_HOME/notmuch/notmuchrc'
let g:notmuch_folders_count_threads=0 let g:notmuch_folders_count_threads=0
let g:notmuch_date_format='%y-%m-%d %H:%M' let g:notmuch_date_format='%y-%m-%d %H:%M'
let g:notmuch_datetime_format='%y-%m-%d %H:%M' let g:notmuch_datetime_format='%y-%m-%d %H:%M'

View file

@ -0,0 +1,5 @@
{ config, lib, ... }:
{
xdg.enable = true;
}

View file

@ -1,9 +1,7 @@
{ sources, ... }: { sources, ... }:
{ {
disabledModules = [ disabledModules = [ "programs/vim.nix" ];
"programs/vim.nix"
];
imports = [ imports = [
./vim.nix ./vim.nix
(sources.tf-nix + "/modules/home/secrets.nix") (sources.tf-nix + "/modules/home/secrets.nix")

View file

@ -1,9 +1,8 @@
{ lib, notmuch, coreutils }@args: let { lib, notmuch, coreutils }@args:
let
notmuch = args.notmuch.super or args.notmuch; notmuch = args.notmuch.super or args.notmuch;
drv = notmuch.override { drv = notmuch.override { withEmacs = false; };
withEmacs = false; in drv.overrideAttrs (old: {
};
in drv.overrideAttrs (old: {
doCheck = false; doCheck = false;
postInstall = '' postInstall = ''
@ -17,10 +16,8 @@
rmdir $out/lib/ruby/vendor_ruby rmdir $out/lib/ruby/vendor_ruby
''; '';
meta = old.meta or {} // { meta = old.meta or { } // {
broken = old.meta.broken or false || notmuch.stdenv.isDarwin; broken = old.meta.broken or false || notmuch.stdenv.isDarwin;
}; };
passthru = old.passthru or {} // { passthru = old.passthru or { } // { super = notmuch; };
super = notmuch; })
};
})