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;
};
};
programs.zsh.enable = true;
# 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/irssi
../../modules/home-manager/email
../../modules/home-manager/password-store
];
home.username = "mthomson";
home.homeDirectory = "/Users/mthomson";
@ -58,6 +59,7 @@
calcurse
glow
gcc
keepassxc
luajit
];

View File

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

View File

@ -5,17 +5,11 @@
w3m
];
home.file = {
"calendar-password.sh" = {
source = ./calendar-password.sh;
executable = true;
};
};
services = {
# mbsync = {
# enable = true;
# frequency = "*-*-* *:*/5:00";
# postExec = "\${pkgs.notmuch} new";
# };
vdirsyncer = {
enable = true;
@ -26,67 +20,12 @@
programs = {
aerc = {
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 = {
general = {
unsafe-accounts-conf = true;
};
ui = {
border-char-vertical = "";
border-char-horizontal = "";
styleset-name = "catppuccin-frappe";
compose = {
address-book-cmd = "khard email --parsable --remove-first-line %s";
};
filters = {
"text/plain" = "colorize";
@ -112,11 +51,9 @@
};
khal = {
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";
realName = "Michael Thomson";
userName = "michael@michaelthomson.dev";
passwordCommand = "${pkgs._1password}/bin/op read \"op://Personal/SES SMTP/password\"";
passwordCommand = "pass email/michael@michaelthomson.dev";
aerc = {
enable = true;
};
@ -167,13 +104,9 @@
url = "https://baikal.michaelthomson.dev/dav.php";
userName = "michael@michaelthomson.dev";
passwordCommand = [
"~/calendar-password.sh"
"pass"
"calendar/michael@michaelthomson.dev"
];
# passwordCommand = [
# "${pkgs._1password}/bin/op"
# "read"
# "op://Personal/Baikal/password"
# ];
};
vdirsyncer = {
enable = true;
@ -182,8 +115,40 @@
};
khal = {
enable = true;
addresses = [ "michael@michaelthomson.dev" ];
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
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
require("lazy").setup({
spec = {

View File

@ -1,14 +1,4 @@
return {
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{
'neovim/nvim-lspconfig',
cmd = 'LspInfo',
@ -35,20 +25,26 @@ return {
end
})
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
vim.api.nvim_create_autocmd({ "VimEnter" }, {
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
local lsp = require('lspconfig')
-- vue
lsp.volar.setup({
capabilities = capabilities,
})
-- typescript / javascript
require'lspconfig'.ts_ls.setup{
capabilities = capabilities,
init_options = {
plugins = {
{
@ -63,121 +59,35 @@ return {
-- eslint
lsp.eslint.setup({
capabilities = capabilities,
})
-- tailwind
lsp.tailwindcss.setup({
capabilities = capabilities,
root_dir = lsp.util.root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts')
})
-- html
lsp.html.setup({
capabilities = capabilities,
})
-- go
lsp.gopls.setup({
capabilities = capabilities,
settings = {
gopls = {
usePlaceholders = true,
completeFunctionCalls = false,
}
}
})
lsp.golangci_lint_ls.setup({
capabilities = capabilities,
})
-- templ
vim.filetype.add({ extension = { templ = "templ" } })
lsp.templ.setup({
capabilities = capabilities,
})
lsp.templ.setup({})
lsp.lua_ls.setup({
capabilities = capabilities,
})
lsp.lua_ls.setup({})
lsp.nil_ls.setup({
capabilities = capabilities,
})
lsp.nil_ls.setup({})
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()
-- local icons = require('mini.icons')
-- icons.setup()
-- icons.tweak_lsp_kind()
local icons = require('mini.icons')
icons.setup()
icons.tweak_lsp_kind()
require('mini.indentscope').setup({
draw = {
@ -107,7 +107,7 @@ return { -- Collection of various small independent plugins/modules
-- saturation = 'high'
-- })
-- require('mini.completion').setup()
require('mini.completion').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 -s escape-time 0
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";
cat = "bat";
};
initExtra = ''
eval "$(/opt/homebrew/bin/brew shellenv)"
'';
#initExtra = ''
#eval "$(/opt/homebrew/bin/brew shellenv)"
#. "/etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh"
#'';
};
starship = {
enable = true;

View File

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