email and stuff

This commit is contained in:
Michael Thomson 2024-09-06 16:08:36 -04:00
parent dde724ef34
commit b868436756
No known key found for this signature in database
14 changed files with 123 additions and 197 deletions

View File

@ -56,6 +56,7 @@
mthomson = import ./home.nix; mthomson = import ./home.nix;
}; };
}; };
programs.zsh.enable = true; programs.zsh.enable = true;
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.

View File

@ -11,6 +11,7 @@
../../modules/home-manager/eza ../../modules/home-manager/bat ../../modules/home-manager/eza ../../modules/home-manager/bat
../../modules/home-manager/irssi ../../modules/home-manager/irssi
../../modules/home-manager/email ../../modules/home-manager/email
../../modules/home-manager/password-store
]; ];
home.username = "mthomson"; home.username = "mthomson";
home.homeDirectory = "/Users/mthomson"; home.homeDirectory = "/Users/mthomson";
@ -58,6 +59,7 @@
calcurse calcurse
glow glow
gcc gcc
keepassxc
luajit luajit
]; ];

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
op read op://Personal/Baikal/password

View File

@ -5,17 +5,11 @@
w3m w3m
]; ];
home.file = {
"calendar-password.sh" = {
source = ./calendar-password.sh;
executable = true;
};
};
services = { services = {
# mbsync = { # mbsync = {
# enable = true; # enable = true;
# frequency = "*-*-* *:*/5:00"; # frequency = "*-*-* *:*/5:00";
# postExec = "\${pkgs.notmuch} new";
# }; # };
vdirsyncer = { vdirsyncer = {
enable = true; enable = true;
@ -26,67 +20,12 @@
programs = { programs = {
aerc = { aerc = {
enable = true; enable = true;
stylesets = {
catppuccin-frappe = ''
*.default=true
*.normal=true
default.fg=#c6d0f5
error.fg=#e78284
warning.fg=#ef9f76
success.fg=#a6d189
tab.fg=#737994
tab.bg=#292c3c
tab.selected.fg=#c6d0f5
tab.selected.bg=#303446
tab.selected.bold=true
border.fg=#232634
border.bold=true
msglist_unread.bold=true
msglist_flagged.fg=#e5c890
msglist_flagged.bold=true
msglist_result.fg=#8caaee
msglist_result.bold=true
msglist_*.selected.bold=true
msglist_*.selected.bg=#414559
dirlist_*.selected.bold=true
dirlist_*.selected.bg=#414559
statusline_default.fg=#949cbb
statusline_default.bg=#414559
statusline_error.bold=true
statusline_success.bold=true
completion_default.selected.bg=#414559
[viewer]
url.fg=#8caaee
url.underline=true
header.bold=true
signature.dim=true
diff_meta.bold=true
diff_chunk.fg=#8caaee
diff_chunk_func.fg=#8caaee
diff_chunk_func.bold=true
diff_add.fg=#a6d189
diff_del.fg=#e78284
quote_*.fg=#737994
quote_1.fg=#949cbb
'';
};
extraConfig = { extraConfig = {
general = { general = {
unsafe-accounts-conf = true; unsafe-accounts-conf = true;
}; };
ui = { compose = {
border-char-vertical = ""; address-book-cmd = "khard email --parsable --remove-first-line %s";
border-char-horizontal = "";
styleset-name = "catppuccin-frappe";
}; };
filters = { filters = {
"text/plain" = "colorize"; "text/plain" = "colorize";
@ -112,11 +51,9 @@
}; };
khal = { khal = {
enable = true; enable = true;
settings = {
view = {
agenda_event_format = "{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{reset}";
};
}; };
khard = {
enable = true;
}; };
}; };
@ -127,7 +64,7 @@
address = "michael@michaelthomson.dev"; address = "michael@michaelthomson.dev";
realName = "Michael Thomson"; realName = "Michael Thomson";
userName = "michael@michaelthomson.dev"; userName = "michael@michaelthomson.dev";
passwordCommand = "${pkgs._1password}/bin/op read \"op://Personal/SES SMTP/password\""; passwordCommand = "pass email/michael@michaelthomson.dev";
aerc = { aerc = {
enable = true; enable = true;
}; };
@ -167,13 +104,9 @@
url = "https://baikal.michaelthomson.dev/dav.php"; url = "https://baikal.michaelthomson.dev/dav.php";
userName = "michael@michaelthomson.dev"; userName = "michael@michaelthomson.dev";
passwordCommand = [ passwordCommand = [
"~/calendar-password.sh" "pass"
"calendar/michael@michaelthomson.dev"
]; ];
# passwordCommand = [
# "${pkgs._1password}/bin/op"
# "read"
# "op://Personal/Baikal/password"
# ];
}; };
vdirsyncer = { vdirsyncer = {
enable = true; enable = true;
@ -182,8 +115,40 @@
}; };
khal = { khal = {
enable = true; enable = true;
addresses = [ "michael@michaelthomson.dev" ];
type = "discover"; type = "discover";
color = "#f2d5cf"; };
};
};
contact = {
basePath = ".contacts";
accounts.personal = {
local = {
type = "filesystem";
fileExt = ".vcf";
};
remote = {
type = "carddav";
url = "https://baikal.michaelthomson.dev/dav.php";
userName = "michael@michaelthomson.dev";
passwordCommand = [
"pass"
"calendar/michael@michaelthomson.dev"
];
};
vdirsyncer = {
enable = true;
auth = "basic";
collections = [ "default" ];
};
khal = {
enable = true;
addresses = [ "michael@michaelthomson.dev" ];
collections = [ "default" ];
};
khard = {
enable = true;
defaultCollection = "default";
}; };
}; };
}; };

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
op read "op://Employee/Work Email API OAuth/client id" --account konradgroup.1password.com

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
op read "op://Employee/Work Email API OAuth/client secret" --account konradgroup.1password.com

View File

@ -0,0 +1,9 @@
{ pkgs, config, ... }:
{
home.packages = with pkgs; [
keepassxc
];
# home.sessionPath = [ "${pkgs.keepassxc}/Applications/KeePassXC.app/Contents/MacOS/" ];
}

View File

@ -17,6 +17,10 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
vim.api.nvim_set_keymap("", "<Space>", "<Nop>", { noremap = true, silent = true })
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Setup lazy.nvim -- Setup lazy.nvim
require("lazy").setup({ require("lazy").setup({
spec = { spec = {

View File

@ -1,14 +1,4 @@
return { return {
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{ {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
cmd = 'LspInfo', cmd = 'LspInfo',
@ -35,20 +25,26 @@ return {
end end
}) })
local capabilities = vim.lsp.protocol.make_client_capabilities() vim.api.nvim_create_autocmd({ "VimEnter" }, {
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) callback = function()
local clients = vim.lsp.get_clients()
for _, client in ipairs(clients) do
local id = client.id
vim.lsp.completion.enable(true, id, 1, { autotrigger = true })
return
end
end,
})
-- Server configs -- Server configs
local lsp = require('lspconfig') local lsp = require('lspconfig')
-- vue -- vue
lsp.volar.setup({ lsp.volar.setup({
capabilities = capabilities,
}) })
-- typescript / javascript -- typescript / javascript
require'lspconfig'.ts_ls.setup{ require'lspconfig'.ts_ls.setup{
capabilities = capabilities,
init_options = { init_options = {
plugins = { plugins = {
{ {
@ -63,121 +59,35 @@ return {
-- eslint -- eslint
lsp.eslint.setup({ lsp.eslint.setup({
capabilities = capabilities,
}) })
-- tailwind -- tailwind
lsp.tailwindcss.setup({ lsp.tailwindcss.setup({
capabilities = capabilities,
root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts') root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts')
}) })
-- html -- html
lsp.html.setup({ lsp.html.setup({
capabilities = capabilities,
}) })
-- go -- go
lsp.gopls.setup({ lsp.gopls.setup({
capabilities = capabilities,
settings = { settings = {
gopls = { gopls = {
usePlaceholders = true, completeFunctionCalls = false,
} }
} }
}) })
lsp.golangci_lint_ls.setup({ lsp.golangci_lint_ls.setup({
capabilities = capabilities,
}) })
-- templ -- templ
vim.filetype.add({ extension = { templ = "templ" } }) vim.filetype.add({ extension = { templ = "templ" } })
lsp.templ.setup({ lsp.templ.setup({})
capabilities = capabilities,
})
lsp.lua_ls.setup({ lsp.lua_ls.setup({})
capabilities = capabilities,
})
lsp.nil_ls.setup({ lsp.nil_ls.setup({})
capabilities = capabilities,
})
end, end,
}, },
{
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
{
'L3MON4D3/LuaSnip',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
},
'saadparwaiz1/cmp_luasnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
},
config = function()
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = 'menu,menuone,noinsert' },
mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-y>'] = cmp.mapping.confirm { select = true },
['<C-Space>'] = cmp.mapping.complete {},
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { 'i', 's' }),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { 'i', 's' }),
},
sources = {
{
name = 'lazydev',
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
group_index = 0,
},
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
},
}
end,
},
{
'nvim-tree/nvim-web-devicons',
}
} }

View File

@ -24,9 +24,9 @@ return { -- Collection of various small independent plugins/modules
require('mini.comment').setup() require('mini.comment').setup()
-- local icons = require('mini.icons') local icons = require('mini.icons')
-- icons.setup() icons.setup()
-- icons.tweak_lsp_kind() icons.tweak_lsp_kind()
require('mini.indentscope').setup({ require('mini.indentscope').setup({
draw = { draw = {
@ -107,7 +107,7 @@ return { -- Collection of various small independent plugins/modules
-- saturation = 'high' -- saturation = 'high'
-- }) -- })
-- require('mini.completion').setup() require('mini.completion').setup()
require('mini.splitjoin').setup() require('mini.splitjoin').setup()

View File

@ -0,0 +1,27 @@
{ pkgs, config, ... }:
{
home.packages = with pkgs; [
passExtensions.pass-otp
passExtensions.pass-file
];
programs = {
gpg = {
enable = true;
};
password-store = {
enable = true;
};
browserpass = {
enable = true;
};
};
# services = {
# gpg-agent = {
# enable = true;
# };
# };
}

View File

@ -15,7 +15,20 @@
set-option -sa terminal-overrides ",xterm*:Tc" set-option -sa terminal-overrides ",xterm*:Tc"
set -s escape-time 0 set -s escape-time 0
set -g status-left-length 30 # could be any number set -g status-left-length 30 # could be any number
set -g status-style 'bg=#333333 fg=#5eacd3' fg="#CBCCC6"
bg="#212732"
status_bg="#34455A"
border_fg="#70748C"
border_active_fg="#FECB6E"
status_left_bg="#FFA759"
set -g status-style "bg=$status_bg,fg=$fg"
set -g pane-border-style "bg=$bg,fg=$border_fg"
set -g pane-active-border-style "bg=$bg,fg=$border_active_fg"
set -g window-status-current-style "fg=$border_active_fg"
set -g window-status-style "fg=$fg"
''; '';
}; };
}; };

View File

@ -20,9 +20,10 @@
cdi = "zi"; cdi = "zi";
cat = "bat"; cat = "bat";
}; };
initExtra = '' #initExtra = ''
eval "$(/opt/homebrew/bin/brew shellenv)" #eval "$(/opt/homebrew/bin/brew shellenv)"
''; #. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
#'';
}; };
starship = { starship = {
enable = true; enable = true;

View File

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.zsh.enable = true; #programs.zsh.enable = true;
nix.settings = { nix.settings = {
trusted-users = ["mthomson"]; trusted-users = ["mthomson"];
@ -18,7 +18,7 @@
users.users.mthomson = { users.users.mthomson = {
shell = pkgs.zsh; #shell = pkgs.zsh;
isNormalUser = true; isNormalUser = true;
description = "Michael Thomson"; description = "Michael Thomson";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];