mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
nixdirfmt, vim fixes (sway, notmuch on systems)
This commit is contained in:
parent
dd8758c8bc
commit
f510d05c8f
6 changed files with 54 additions and 48 deletions
|
|
@ -6,9 +6,7 @@ let
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
||||||
imports = lib.attrValues homeModules ++ [
|
imports = lib.attrValues homeModules
|
||||||
../modules/home
|
++ [ ../modules/home ./private/profile/home ];
|
||||||
./private/profile/home
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,35 +2,35 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.deploy.profile.gui {
|
config = lib.mkIf config.deploy.profile.gui {
|
||||||
programs.notmuch = {
|
programs.notmuch = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hooks = { preNew = "mbsync --all"; };
|
hooks = { preNew = "mbsync --all"; };
|
||||||
};
|
};
|
||||||
programs.mbsync.enable = true;
|
programs.mbsync.enable = true;
|
||||||
programs.msmtp.enable = true;
|
programs.msmtp.enable = true;
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
maildirBasePath = "${config.home.homeDirectory}/mail";
|
maildirBasePath = "${config.home.homeDirectory}/mail";
|
||||||
accounts.kat = {
|
accounts.kat = {
|
||||||
address = "kat@kittywit.ch";
|
address = "kat@kittywit.ch";
|
||||||
primary = true;
|
primary = true;
|
||||||
realName = "kat witch";
|
realName = "kat witch";
|
||||||
userName = "kat@kittywit.ch";
|
userName = "kat@kittywit.ch";
|
||||||
passwordCommand = ''
|
passwordCommand = ''
|
||||||
bitw -p gpg://${
|
bitw -p gpg://${
|
||||||
../../../private/files/bitw/master.gpg
|
../../../private/files/bitw/master.gpg
|
||||||
} get "kittywitch email"'';
|
} get "kittywitch email"'';
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
mbsync.enable = true;
|
mbsync.enable = true;
|
||||||
mbsync.create = "maildir";
|
mbsync.create = "maildir";
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
imap.host = "kittywit.ch";
|
imap.host = "kittywit.ch";
|
||||||
smtp.host = "kittywit.ch";
|
smtp.host = "kittywit.ch";
|
||||||
gpg = {
|
gpg = {
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
|
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
|
||||||
};
|
};
|
||||||
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#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.dataFile = {
|
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 = "";
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
" Enable mouse
|
" Enable mouse
|
||||||
set mouse=a
|
set mouse=a
|
||||||
|
|
||||||
" notmuch!
|
" notmuch!
|
||||||
let g:notmuch_config_file='$XDG_CONFIG_HOME/notmuch/notmuchrc'
|
let g:notmuch_config_file='${config.xdg.configHome}/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'
|
||||||
|
|
@ -195,4 +195,10 @@
|
||||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||||
" Resume latest coc list.
|
" Resume latest coc list.
|
||||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
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
|
||||||
|
"")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.deploy.profile.kat {
|
config = lib.mkIf config.deploy.profile.kat { xdg.enable = true; };
|
||||||
xdg.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,19 @@ with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.deploy;
|
cfg = config.deploy;
|
||||||
secretsScript = concatMapStrings (file: ''
|
secretsScript = concatMapStrings (file:
|
||||||
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
|
''
|
||||||
cat > ${file.path}
|
ssh $NIX_SSHOPTS root@${cfg.ssh.host} "mkdir -p ${toString file.out.dir}
|
||||||
chmod ${file.mode} ${file.path}
|
cat > ${file.path}
|
||||||
chown ${file.owner}:${file.group} ${file.path}"'' + (if file.source != null then "< ${toString file.source}\n" else ''
|
chmod ${file.mode} ${file.path}
|
||||||
<<'EOF'
|
chown ${file.owner}:${file.group} ${file.path}"''
|
||||||
${file.text}
|
+ (if file.source != null then ''
|
||||||
EOF
|
< ${toString file.source}
|
||||||
'')) (attrValues config.secrets.files);
|
'' else ''
|
||||||
|
<<'EOF'
|
||||||
|
${file.text}
|
||||||
|
EOF
|
||||||
|
'')) (attrValues config.secrets.files);
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
deploy = {
|
deploy = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue