diff --git a/hosts/macbook/configuration.nix b/hosts/macbook/configuration.nix index a394ff7..dadb3b5 100644 --- a/hosts/macbook/configuration.nix +++ b/hosts/macbook/configuration.nix @@ -31,6 +31,12 @@ hello ]; + + environment.variables = { + EDITOR = "nvim"; + ZK_NOTEBOOK_DIR = "~/notes"; + }; + services = { skhd = { enable = true; diff --git a/hosts/macbook/home.nix b/hosts/macbook/home.nix index 29ec9cf..583539c 100644 --- a/hosts/macbook/home.nix +++ b/hosts/macbook/home.nix @@ -11,11 +11,17 @@ ../../modules/home-manager/eza ../../modules/home-manager/bat ../../modules/home-manager/irssi + ../../modules/home-manager/email ]; home.username = "mthomson"; home.homeDirectory = "/Users/mthomson"; home.stateVersion = "23.11"; + home.sessionVariables = { + EDITOR = "nvim"; + ZK_NOTEBOOK_DIR = "notes"; + }; + home.packages = with pkgs; [ btop spotify @@ -26,6 +32,11 @@ ripgrep tldr cowsay + lazygit + k9s + tintin + nb + w3m ]; programs.home-manager.enable = true; diff --git a/modules/home-manager/email/default.nix b/modules/home-manager/email/default.nix new file mode 100644 index 0000000..58725dd --- /dev/null +++ b/modules/home-manager/email/default.nix @@ -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"; + }; + }; +} diff --git a/modules/home-manager/neovim/nvim/init.lua b/modules/home-manager/neovim/nvim/init.lua index dadebf2..895bbc9 100644 --- a/modules/home-manager/neovim/nvim/init.lua +++ b/modules/home-manager/neovim/nvim/init.lua @@ -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", "", "silent !tmux neww tmux-sessionizer") vim.keymap.set("n", "J", "mzJ`z") -vim.keymap.set("n", "fe", "Explore") +vim.keymap.set("n", "fe", "Oil") vim.keymap.set("i", "jk", "") diff --git a/modules/home-manager/neovim/nvim/lua/plugins/hardtime.lua b/modules/home-manager/neovim/nvim/lua/plugins/hardtime.lua deleted file mode 100644 index c40eba8..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/hardtime.lua +++ /dev/null @@ -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"} - } -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/hawtkeys.lua b/modules/home-manager/neovim/nvim/lua/plugins/hawtkeys.lua deleted file mode 100644 index e1e435f..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/hawtkeys.lua +++ /dev/null @@ -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', '1', '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" }, - }, - }, -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua b/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua index f303243..c90b61a 100644 --- a/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua +++ b/modules/home-manager/neovim/nvim/lua/plugins/lsp.lua @@ -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 { -- [''] = cmp_action.luasnip_shift_supertab(), }), }) + + -- Server configs + + -- vue + require('lspconfig').volar.setup({}) + + -- typescript / javascript + require'lspconfig'.tsserver.setup{ + filetypes = { + "javascript", + "typescript", + "vue", + }, + } + end, } diff --git a/modules/home-manager/neovim/nvim/lua/plugins/neorg.lua b/modules/home-manager/neovim/nvim/lua/plugins/neorg.lua new file mode 100644 index 0000000..ee0af38 --- /dev/null +++ b/modules/home-manager/neovim/nvim/lua/plugins/neorg.lua @@ -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 = "", + }, + }, + ["core.dirman"] = { + config = { + workspaces = { + Notes = "~/Notes", + }, + default_workspace = "Notes" + } + }, + } + }) + end, +} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/obsidian.lua b/modules/home-manager/neovim/nvim/lua/plugins/obsidian.lua new file mode 100644 index 0000000..28c5c75 --- /dev/null +++ b/modules/home-manager/neovim/nvim/lua/plugins/obsidian.lua @@ -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 = "", + -- Insert a link to the selected note. + insert_link = "", + }, + }, + -- see below for full list of options 👇 + }, +} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/oil.lua b/modules/home-manager/neovim/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..9daa9f4 --- /dev/null +++ b/modules/home-manager/neovim/nvim/lua/plugins/oil.lua @@ -0,0 +1,6 @@ +return { + 'stevearc/oil.nvim', + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, +} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/pets.lua b/modules/home-manager/neovim/nvim/lua/plugins/pets.lua deleted file mode 100644 index 6468b36..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/pets.lua +++ /dev/null @@ -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 -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/rest.lua b/modules/home-manager/neovim/nvim/lua/plugins/rest.lua deleted file mode 100644 index ca66ed1..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/rest.lua +++ /dev/null @@ -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", "r", "RestNvim") - end -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/transparent.lua b/modules/home-manager/neovim/nvim/lua/plugins/transparent.lua deleted file mode 100644 index 6934aa6..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/transparent.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - 'xiyaowong/transparent.nvim' -} diff --git a/modules/home-manager/neovim/nvim/lua/plugins/ts-error-translator.lua b/modules/home-manager/neovim/nvim/lua/plugins/ts-error-translator.lua deleted file mode 100644 index d771e5d..0000000 --- a/modules/home-manager/neovim/nvim/lua/plugins/ts-error-translator.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - 'dmmulroy/ts-error-translator.nvim' -} diff --git a/modules/home-manager/wezterm/default.nix b/modules/home-manager/wezterm/default.nix index 705b8c1..1d20f37 100644 --- a/modules/home-manager/wezterm/default.nix +++ b/modules/home-manager/wezterm/default.nix @@ -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,