nixdirfmt, vim fixes (sway, notmuch on systems)

This commit is contained in:
kat witch 2021-03-14 13:11:03 +00:00
parent dd8758c8bc
commit f510d05c8f
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
6 changed files with 54 additions and 48 deletions

View file

@ -6,9 +6,7 @@ let
};
in {
imports = lib.attrValues homeModules ++ [
../modules/home
./private/profile/home
];
imports = lib.attrValues homeModules
++ [ ../modules/home ./private/profile/home ];
}

View file

@ -2,35 +2,35 @@
{
config = lib.mkIf config.deploy.profile.gui {
programs.notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
passwordCommand = ''
bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "kittywitch email"'';
msmtp.enable = true;
mbsync.enable = true;
mbsync.create = "maildir";
notmuch.enable = true;
imap.host = "kittywit.ch";
smtp.host = "kittywit.ch";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
programs.notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
passwordCommand = ''
bitw -p gpg://${
../../../private/files/bitw/master.gpg
} get "kittywitch email"'';
msmtp.enable = true;
mbsync.enable = true;
mbsync.create = "maildir";
notmuch.enable = true;
imap.host = "kittywit.ch";
smtp.host = "kittywit.ch";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
};
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
};
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
};
}

View file

@ -24,7 +24,7 @@
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.dataFile = {
xdg.dataFile = {
"vim/undo/.keep".text = "";
"vim/swap/.keep".text = "";
"vim/backup/.keep".text = "";

View file

@ -4,8 +4,8 @@
" Enable mouse
set mouse=a
" notmuch!
let g:notmuch_config_file='$XDG_CONFIG_HOME/notmuch/notmuchrc'
" notmuch!
let g:notmuch_config_file='${config.xdg.configHome}/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'
@ -195,4 +195,10 @@
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
''
'' + (if config.deploy.profile.sway == true then ''
noremap "+y y:call system("wl-copy", @")<CR>
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', ''', 'g')<CR>p
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', ''', 'g')<CR>p
'' else
"")

View file

@ -1,7 +1,5 @@
{ config, lib, ... }:
{
config = lib.mkIf config.deploy.profile.kat {
xdg.enable = true;
};
config = lib.mkIf config.deploy.profile.kat { xdg.enable = true; };
}

View file

@ -4,15 +4,19 @@ with lib;
let
cfg = config.deploy;
secretsScript = concatMapStrings (file: ''
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
cat > ${file.path}
chmod ${file.mode} ${file.path}
chown ${file.owner}:${file.group} ${file.path}"'' + (if file.source != null then "< ${toString file.source}\n" else ''
<<'EOF'
${file.text}
EOF
'')) (attrValues config.secrets.files);
secretsScript = concatMapStrings (file:
''
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
cat > ${file.path}
chmod ${file.mode} ${file.path}
chown ${file.owner}:${file.group} ${file.path}"''
+ (if file.source != null then ''
< ${toString file.source}
'' else ''
<<'EOF'
${file.text}
EOF
'')) (attrValues config.secrets.files);
in {
options = {
deploy = {