Merge branch 'main' into thinkpad
This commit is contained in:
commit
0842de778f
@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "A simple NixOS flake";
|
||||
description = "Michael's Nix Config";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
|
@ -31,6 +31,11 @@
|
||||
hello
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
ZK_NOTEBOOK_DIR = "~/notes";
|
||||
};
|
||||
|
||||
services = {
|
||||
skhd = {
|
||||
enable = true;
|
||||
|
@ -16,16 +16,40 @@
|
||||
home.homeDirectory = "/Users/mthomson";
|
||||
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; [
|
||||
btop
|
||||
spotify
|
||||
spotify-player
|
||||
neofetch
|
||||
jq
|
||||
fzf
|
||||
ripgrep
|
||||
tldr
|
||||
cowsay
|
||||
lazygit
|
||||
k9s
|
||||
tintin
|
||||
nb
|
||||
w3m
|
||||
lua
|
||||
kubectl
|
||||
k9s
|
||||
kubeseal
|
||||
fluxcd
|
||||
wireguard-tools
|
||||
kompose
|
||||
inetutils
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
52
modules/home-manager/email/default.nix
Normal file
52
modules/home-manager/email/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
@ -3,6 +3,8 @@
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
fzf
|
||||
ripgrep
|
||||
];
|
||||
home.file.".config/nvim/" = {
|
||||
source = ./nvim;
|
||||
|
@ -25,7 +25,7 @@ g.maplocalleader = " "
|
||||
-- Load plugins
|
||||
require('lazy').setup('plugins')
|
||||
|
||||
vim.cmd 'colorscheme catppuccin-frappe'
|
||||
vim.cmd 'colorscheme catppuccin-mocha'
|
||||
|
||||
-- Load core settings
|
||||
opt.termguicolors = true -- Enable colors in terminal
|
||||
@ -44,6 +44,7 @@ opt.clipboard = "unnamedplus" -- Access system clipboard
|
||||
opt.laststatus = 3 -- Global status line
|
||||
opt.swapfile = false
|
||||
opt.wrap = false
|
||||
vim.opt_local.conceallevel = 2
|
||||
|
||||
-- Time in milliseconds to wait for a mapped sequence to complete.
|
||||
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", "<leader>fe", "<cmd>Explore<CR>")
|
||||
vim.keymap.set("n", "<leader>fe", "<cmd>Oil<CR>")
|
||||
|
||||
vim.keymap.set("i", "jk", "<Esc>")
|
||||
|
||||
|
@ -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"}
|
||||
}
|
||||
}
|
@ -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" },
|
||||
},
|
||||
},
|
||||
}
|
@ -4,8 +4,8 @@ return {
|
||||
dependencies = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'}, -- Required
|
||||
{'williamboman/mason.nvim'}, -- Optional
|
||||
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
-- {'williamboman/mason.nvim'}, -- Optional
|
||||
-- {'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'}, -- Required
|
||||
@ -33,13 +33,13 @@ return {
|
||||
end)
|
||||
|
||||
-- Mason Config
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = {},
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
}
|
||||
})
|
||||
-- require('mason').setup({})
|
||||
-- require('mason-lspconfig').setup({
|
||||
-- ensure_installed = {},
|
||||
-- handlers = {
|
||||
-- lsp_zero.default_setup,
|
||||
-- }
|
||||
-- })
|
||||
|
||||
-- cmp Config
|
||||
|
||||
@ -77,5 +77,20 @@ return {
|
||||
-- ['<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,
|
||||
}
|
||||
|
38
modules/home-manager/neovim/nvim/lua/plugins/neorg.lua
Normal file
38
modules/home-manager/neovim/nvim/lua/plugins/neorg.lua
Normal 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,
|
||||
}
|
71
modules/home-manager/neovim/nvim/lua/plugins/obsidian.lua
Normal file
71
modules/home-manager/neovim/nvim/lua/plugins/obsidian.lua
Normal 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 👇
|
||||
},
|
||||
}
|
6
modules/home-manager/neovim/nvim/lua/plugins/oil.lua
Normal file
6
modules/home-manager/neovim/nvim/lua/plugins/oil.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
}
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
return {
|
||||
'xiyaowong/transparent.nvim'
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
return {
|
||||
'dmmulroy/ts-error-translator.nvim'
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
return {
|
||||
color_scheme = 'catppuccin-frappe',
|
||||
color_scheme = 'catppuccin-mocha',
|
||||
font = wezterm.font('PragmataPro Liga'),
|
||||
font_size = 16,
|
||||
use_fancy_tab_bar = false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user