Merge branch 'main' into thinkpad

This commit is contained in:
Michael Thomson 2024-04-23 20:19:17 -04:00
commit 0842de778f
17 changed files with 229 additions and 145 deletions

View File

@ -1,5 +1,5 @@
{ {
description = "A simple NixOS flake"; description = "Michael's Nix Config";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";

View File

@ -31,6 +31,11 @@
hello hello
]; ];
environment.variables = {
EDITOR = "nvim";
ZK_NOTEBOOK_DIR = "~/notes";
};
services = { services = {
skhd = { skhd = {
enable = true; enable = true;

View File

@ -16,16 +16,40 @@
home.homeDirectory = "/Users/mthomson"; home.homeDirectory = "/Users/mthomson";
home.stateVersion = "23.11"; home.stateVersion = "23.11";
home.sessionVariables = {
EDITOR = "nvim";
ZK_NOTEBOOK_DIR = "notes";
};
programs = {
direnv = {
enable = true;
enableZshIntegration = true; # see note on other shells below
nix-direnv.enable = true;
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
btop btop
spotify spotify
spotify-player spotify-player
neofetch neofetch
jq jq
fzf
ripgrep
tldr tldr
cowsay cowsay
lazygit
k9s
tintin
nb
w3m
lua
kubectl
k9s
kubeseal
fluxcd
wireguard-tools
kompose
inetutils
]; ];
programs.home-manager.enable = true; programs.home-manager.enable = true;

View File

@ -0,0 +1,52 @@
{ pkgs, config, ... }:
{
home.packages = with pkgs; [
protonmail-bridge
];
programs = {
mbsync = {
enable = true;
};
neomutt = {
enable = true;
};
msmtp = {
enable = true;
};
notmuch = {
enable = true;
};
password-store = {
enable = true;
};
};
accounts.email = {
accounts.michaelthomson = {
address = "michael@michaelthomson.dev";
imap = {
host = "127.0.0.1";
port = 1143;
};
mbsync = {
enable = true;
create = "maildir";
};
msmtp = {
enable = true;
};
notmuch = {
enable = true;
};
primary = true;
realName = "Michael Thomson";
smtp = {
host = "127.0.0.1";
port = "1025";
};
userName = "michael@michaelthomson.dev";
};
};
}

View File

@ -3,6 +3,8 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim neovim
fzf
ripgrep
]; ];
home.file.".config/nvim/" = { home.file.".config/nvim/" = {
source = ./nvim; source = ./nvim;

View File

@ -25,7 +25,7 @@ g.maplocalleader = " "
-- Load plugins -- Load plugins
require('lazy').setup('plugins') require('lazy').setup('plugins')
vim.cmd 'colorscheme catppuccin-frappe' vim.cmd 'colorscheme catppuccin-mocha'
-- Load core settings -- Load core settings
opt.termguicolors = true -- Enable colors in terminal opt.termguicolors = true -- Enable colors in terminal
@ -44,6 +44,7 @@ opt.clipboard = "unnamedplus" -- Access system clipboard
opt.laststatus = 3 -- Global status line opt.laststatus = 3 -- Global status line
opt.swapfile = false opt.swapfile = false
opt.wrap = false opt.wrap = false
vim.opt_local.conceallevel = 2
-- Time in milliseconds to wait for a mapped sequence to complete. -- Time in milliseconds to wait for a mapped sequence to complete.
opt.timeoutlen = 300 opt.timeoutlen = 300
@ -84,7 +85,7 @@ vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
vim.keymap.set("n", "J", "mzJ`z") vim.keymap.set("n", "J", "mzJ`z")
vim.keymap.set("n", "<leader>fe", "<cmd>Explore<CR>") vim.keymap.set("n", "<leader>fe", "<cmd>Oil<CR>")
vim.keymap.set("i", "jk", "<Esc>") vim.keymap.set("i", "jk", "<Esc>")

View File

@ -1,7 +0,0 @@
return {
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
opts = {
disabled_filetypes = {"qf", "netrw", "NvimTree", "lazy", "mason", "oil", "telescope"}
}
}

View File

@ -1,41 +0,0 @@
return {
"tris203/hawtkeys.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = {
leader = " ", -- the key you want to use as the leader, default is space
homerow = 2, -- the row you want to use as the homerow, default is 2
powerFingers = { 2, 3, 6, 7 }, -- the fingers you want to use as the powerfingers, default is {2,3,6,7}
keyboardLayout = "qwerty", -- the keyboard layout you use, default is qwerty
customMaps = {
--- EG local map = vim.api
--- map.nvim_set_keymap('n', '<leader>1', '<cmd>echo 1')
{
["map.nvim_set_keymap"] = { --name of the expression
modeIndex = "1", -- the position of the mode setting
lhsIndex = "2", -- the position of the lhs setting
rhsIndex = "3", -- the position of the rhs setting
optsIndex = "4", -- the position of the index table
method = "dot_index_expression", -- if the function name contains a dot
},
},
--- EG local map2 = vim.api.nvim_set_keymap
["map2"] = { --name of the function
modeIndex = 1, --if you use a custom function with a fixed value, eg normRemap, then this can be a fixed mode eg 'n'
lhsIndex = 2,
rhsIndex = 3,
optsIndex = 4,
method = "function_call",
},
-- If you use lazy.nvim's keys property to configure keymaps in your plugins
["lazy"] = {
method = "lazy",
},
},
highlights = { -- these are the highlight used in search mode
HawtkeysMatchGreat = { fg = "green", bold = true },
HawtkeysMatchGood = { fg = "green"},
HawtkeysMatchOk = { fg = "yellow" },
HawtkeysMatchBad = { fg = "red" },
},
},
}

View File

@ -4,8 +4,8 @@ return {
dependencies = { dependencies = {
-- LSP Support -- LSP Support
{'neovim/nvim-lspconfig'}, -- Required {'neovim/nvim-lspconfig'}, -- Required
{'williamboman/mason.nvim'}, -- Optional -- {'williamboman/mason.nvim'}, -- Optional
{'williamboman/mason-lspconfig.nvim'}, -- Optional -- {'williamboman/mason-lspconfig.nvim'}, -- Optional
-- Autocompletion -- Autocompletion
{'hrsh7th/nvim-cmp'}, -- Required {'hrsh7th/nvim-cmp'}, -- Required
@ -33,13 +33,13 @@ return {
end) end)
-- Mason Config -- Mason Config
require('mason').setup({}) -- require('mason').setup({})
require('mason-lspconfig').setup({ -- require('mason-lspconfig').setup({
ensure_installed = {}, -- ensure_installed = {},
handlers = { -- handlers = {
lsp_zero.default_setup, -- lsp_zero.default_setup,
} -- }
}) -- })
-- cmp Config -- cmp Config
@ -77,5 +77,20 @@ return {
-- ['<S-Tab>'] = cmp_action.luasnip_shift_supertab(), -- ['<S-Tab>'] = cmp_action.luasnip_shift_supertab(),
}), }),
}) })
-- Server configs
-- vue
require('lspconfig').volar.setup({})
-- typescript / javascript
require'lspconfig'.tsserver.setup{
filetypes = {
"javascript",
"typescript",
"vue",
},
}
end, end,
} }

View File

@ -0,0 +1,38 @@
return {
"nvim-neorg/neorg",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-treesitter/nvim-treesitter-textobjects",
"nvim-cmp",
"nvim-lua/plenary.nvim",
},
lazy = false,
version = "7.0.0", -- Pin Neorg to the latest stable release
build = ":Neorg sync-parsers",
cmd = "Neorg",
config = function()
require('neorg').setup({
load = {
["core.defaults"] = {},
["core.completion"] = { config = { engine = "nvim-cmp", name = "[Neorg]" } },
["core.integrations.nvim-cmp"] = {},
["core.concealer"] = { config = { icon_preset = "basic" } },
["core.keybinds"] = {
-- https://github.com/nvim-neorg/neorg/blob/main/lua/neorg/modules/core/keybinds/keybinds.lua
config = {
default_keybinds = true,
neorg_leader = "<Leader><Leader>",
},
},
["core.dirman"] = {
config = {
workspaces = {
Notes = "~/Notes",
},
default_workspace = "Notes"
}
},
}
})
end,
}

View File

@ -0,0 +1,71 @@
return {
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
ft = "markdown",
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
event = {
-- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
"BufReadPre " .. vim.fn.expand "~" .. "/notes/Everything/**.md"
},
dependencies = {
-- Required.
"nvim-lua/plenary.nvim",
-- see below for full list of optional dependencies 👇
},
opts = {
workspaces = {
{
name = "everything",
path = "~/notes/Everything",
},
},
notes_subdir = "notes",
daily_notes = {
-- Optional, if you keep daily notes in a separate directory.
folder = "notes/dailies",
-- Optional, if you want to change the date format for the ID of daily notes.
date_format = "%Y-%m-%d",
-- Optional, if you want to change the date format of the default alias of daily notes.
alias_format = "%B %-d, %Y",
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
template = "daily.md"
},
-- Optional, completion of wiki links, local markdown links, and tags using nvim-cmp.
completion = {
-- Set to false to disable completion.
nvim_cmp = true,
-- Trigger completion at 2 chars.
min_chars = 2,
},
new_notes_location = "notes_subdir",
templates = {
subdir = "notes/templates",
date_format = "%Y-%m-%d",
time_format = "%H:%M",
-- A map for custom variables, the key should be the variable and the value a function
substitutions = {},
},
picker = {
-- Set your preferred picker. Can be one of 'telescope.nvim', 'fzf-lua', or 'mini.pick'.
name = "telescope.nvim",
-- Optional, configure key mappings for the picker. These are the defaults.
-- Not all pickers support all mappings.
mappings = {
-- Create a new note from your query.
new = "<C-x>",
-- Insert a link to the selected note.
insert_link = "<C-l>",
},
},
-- see below for full list of options 👇
},
}

View File

@ -0,0 +1,6 @@
return {
'stevearc/oil.nvim',
opts = {},
-- Optional dependencies
dependencies = { "nvim-tree/nvim-web-devicons" },
}

View File

@ -1,22 +0,0 @@
return {
"giusgad/pets.nvim",
dependencies = { "MunifTanjim/nui.nvim", "giusgad/hologram.nvim" },
config = function ()
require("pets").setup({
row = 1, -- the row (height) to display the pet at (higher row means the pet is lower on the screen), must be 1<=row<=10
col = 0, -- the column to display the pet at (set to high number to have it stay still on the right side)
speed_multiplier = 1, -- you can make your pet move faster/slower. If slower the animation will have lower fps.
default_pet = "dog", -- the pet to use for the PetNew command
default_style = "brown", -- the style of the pet to use for the PetNew command
random = true, -- whether to use a random pet for the PetNew command, overrides default_pet and default_style
death_animation = true, -- animate the pet's death, set to false to feel less guilt -- currently no animations are available
popup = { -- popup options, try changing these if you see a rectangle around the pets
width = "30%", -- can be a string with percentage like "45%" or a number of columns like 45
winblend = 100, -- winblend value - see :h 'winblend' - only used if avoid_statusline is false
hl = { Normal = "Normal" }, -- hl is only set if avoid_statusline is true, you can put any hl group instead of "Normal"
avoid_statusline = true, -- if winblend is 100 then the popup is invisible and covers the statusline, if that
-- doesn't work for you then set this to true and the popup will use hl and will be spawned above the statusline (hopefully)
}
})
end
}

View File

@ -1,54 +0,0 @@
return {
"rest-nvim/rest.nvim",
dependencies = { { "nvim-lua/plenary.nvim" } },
config = function()
require("rest-nvim").setup({
-- Open request results in a horizontal split
result_split_horizontal = false,
-- Keep the http file buffer above|left when split horizontal|vertical
result_split_in_place = false,
-- stay in current windows (.http file) or change to results window (default)
stay_in_current_window_after_split = false,
-- Skip SSL verification, useful for unknown certificates
skip_ssl_verification = false,
-- Encode URL before making request
encode_url = true,
-- Highlight request on run
highlight = {
enabled = true,
timeout = 150,
},
result = {
-- toggle showing URL, HTTP info, headers at top the of result window
show_url = true,
-- show the generated curl command in case you want to launch
-- the same request via the terminal (can be verbose)
show_curl_command = false,
show_http_info = true,
show_headers = true,
-- table of curl `--write-out` variables or false if disabled
-- for more granular control see Statistics Spec
show_statistics = false,
-- executables or functions for formatting response body [optional]
-- set them to false if you want to disable them
formatters = {
json = "jq",
html = function(body)
return vim.fn.system({"tidy", "-i", "-q", "-"}, body)
end
},
},
-- Jump to request line on run
jump_to_request = false,
env_file = '.env',
-- for telescope select
env_pattern = "\\.env$",
env_edit_command = "tabedit",
custom_dynamic_variables = {},
yank_dry_run = true,
search_back = true,
})
vim.keymap.set("n", "<leader>r", "<Plug>RestNvim")
end
}

View File

@ -1,3 +0,0 @@
return {
'xiyaowong/transparent.nvim'
}

View File

@ -1,3 +0,0 @@
return {
'dmmulroy/ts-error-translator.nvim'
}

View File

@ -5,7 +5,7 @@
enable = true; enable = true;
extraConfig = '' extraConfig = ''
return { return {
color_scheme = 'catppuccin-frappe', color_scheme = 'catppuccin-mocha',
font = wezterm.font('PragmataPro Liga'), font = wezterm.font('PragmataPro Liga'),
font_size = 16, font_size = 16,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,