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 = {
enable = true;
hooks = {
preNew = "mbsync --all";
};
hooks = { preNew = "mbsync --all"; };
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
@ -16,7 +14,10 @@
primary = true;
realName = "kat witch";
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;
mbsync.enable = true;
mbsync.create = "maildir";
@ -28,6 +29,6 @@
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
};
};
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
}

View file

@ -24,11 +24,13 @@
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.configFile = {
xdg.dataFile = {
"vim/undo/.keep".text = "";
"vim/swap/.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 }:
''
" 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
set mouse=a
" 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_date_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, ... }:
{
disabledModules = [
"programs/vim.nix"
];
disabledModules = [ "programs/vim.nix" ];
imports = [
./vim.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;
drv = notmuch.override {
withEmacs = false;
};
in drv.overrideAttrs (old: {
drv = notmuch.override { withEmacs = false; };
in drv.overrideAttrs (old: {
doCheck = false;
postInstall = ''
@ -17,10 +16,8 @@
rmdir $out/lib/ruby/vendor_ruby
'';
meta = old.meta or {} // {
meta = old.meta or { } // {
broken = old.meta.broken or false || notmuch.stdenv.isDarwin;
};
passthru = old.passthru or {} // {
super = notmuch;
};
})
passthru = old.passthru or { } // { super = notmuch; };
})