From 087d38487ca5307c3afd14ca699768e68d70d39d Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Wed, 6 Dec 2023 12:28:01 +0800 Subject: [PATCH] feat: access extraPackages in neovim's terminal - add a shell wrapper --- flake.lock | 8 +- flake.nix | 2 +- home/base/desktop/development.nix | 2 +- .../desktop/neovim/astronvim_user/init.lua | 233 +++++++++-------- .../neovim/astronvim_user/mappings.lua | 7 +- home/base/desktop/neovim/default.nix | 246 ++++++++++-------- modules/darwin/apps.nix | 2 +- 7 files changed, 278 insertions(+), 222 deletions(-) diff --git a/flake.lock b/flake.lock index fd73dd47..2398bb19 100644 --- a/flake.lock +++ b/flake.lock @@ -45,16 +45,16 @@ "astronvim": { "flake": false, "locked": { - "lastModified": 1699528269, - "narHash": "sha256-cC1isyscpvNQ07n/Eb6rlfvuQ/K+7mCjdGJq4m/PUHk=", + "lastModified": 1701266895, + "narHash": "sha256-wttBcj9OoFHx+EukGzQYKHVlApphZXzZqY5zP5chU6g=", "owner": "AstroNvim", "repo": "AstroNvim", - "rev": "59d657c223038359b2b5e230805abca8d919280d", + "rev": "bdbc0fef3f33443251e6b45b252b98c42335b881", "type": "github" }, "original": { "owner": "AstroNvim", - "ref": "v3.37.12", + "ref": "v3.39.0", "repo": "AstroNvim", "type": "github" } diff --git a/flake.nix b/flake.nix index 05fc1d8e..909197b5 100644 --- a/flake.nix +++ b/flake.nix @@ -329,7 +329,7 @@ # AstroNvim is an aesthetic and feature-rich neovim config. astronvim = { - url = "github:AstroNvim/AstroNvim/v3.37.12"; + url = "github:AstroNvim/AstroNvim/v3.39.0"; flake = false; }; diff --git a/home/base/desktop/development.nix b/home/base/desktop/development.nix index 4832999c..952ee91b 100644 --- a/home/base/desktop/development.nix +++ b/home/base/desktop/development.nix @@ -15,7 +15,7 @@ ############################################################# home.packages = with pkgs; [ - (python311.withPackages ( + (python3.withPackages ( ps: with ps; [ ipython diff --git a/home/base/desktop/neovim/astronvim_user/init.lua b/home/base/desktop/neovim/astronvim_user/init.lua index bb0cfcb8..cbf11d75 100644 --- a/home/base/desktop/neovim/astronvim_user/init.lua +++ b/home/base/desktop/neovim/astronvim_user/init.lua @@ -5,9 +5,9 @@ return { opt = { relativenumber = true, -- Show relative numberline signcolumn = "auto", -- Show sign column when used only - spell = false, -- Spell checking - swapfile = false, -- Swapfile - smartindent = false; -- fix https://github.com/ryan4yin/nix-config/issues/4 + spell = false, -- Spell checking + swapfile = false, -- Swapfile + smartindent = false, -- fix https://github.com/ryan4yin/nix-config/issues/4 }, }, @@ -24,7 +24,6 @@ return { { import = "astrocommunity.motion.leap-nvim" }, { import = "astrocommunity.motion.flit-nvim" }, { import = "astrocommunity.scrolling.nvim-scrollbar" }, - { import = "astrocommunity.editing-support.auto-save-nvim" }, { import = "astrocommunity.editing-support.todo-comments-nvim" }, -- Language Support ---- Frontend & NodeJS @@ -57,7 +56,7 @@ return { -- https://github.com/echasnovski/mini.ai { import = "astrocommunity.motion.mini-ai" }, { import = "astrocommunity.motion.flash-nvim" }, - { "folke/flash.nvim", vscode = false }, + { "folke/flash.nvim", vscode = false }, -- Lua implementation of CamelCaseMotion, with extra consideration of punctuation. { import = "astrocommunity.motion.nvim-spider" }, -- AI Assistant @@ -67,22 +66,36 @@ return { "zbirenbaum/copilot.lua", opts = function(_, opts) opts.filetypes = { - yaml = true; + yaml = true, markdown = true, } end, }, + { + "0x00-ketsu/autosave.nvim", + opts = function(_, opts) + end, + }, + + { + "akinsho/toggleterm.nvim", + opts = function(_, opts) + -- custom shell with all neovim's exra packags accessible + opts.shell = "nvim-nushell"; + end, + }, + -- markdown preview { - '0x00-ketsu/markdown-preview.nvim', - ft = {'md', 'markdown', 'mkd', 'mkdn', 'mdwn', 'mdown', 'mdtxt', 'mdtext', 'rmd', 'wiki'}, + "0x00-ketsu/markdown-preview.nvim", + ft = { "md", "markdown", "mkd", "mkdn", "mdwn", "mdown", "mdtxt", "mdtext", "rmd", "wiki" }, config = function() - require('markdown-preview').setup { + require("markdown-preview").setup({ -- your configuration comes here -- or leave it empty to use the default settings -- refer to the setup section below - } + }) end, }, @@ -90,7 +103,7 @@ return { { "gbprod/yanky.nvim", opts = function() - local mapping = require "yanky.telescope.mapping" + local mapping = require("yanky.telescope.mapping") local mappings = mapping.get_defaults() mappings.i[""] = nil return { @@ -104,26 +117,26 @@ return { } end, keys = { - { "y", "(YankyYank)", mode = { "n", "x" }, desc = "Yank text" }, - { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after cursor" }, - { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before cursor" }, - { "gp", "(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after selection" }, - { "gP", "(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before selection" }, - { "[y", "(YankyCycleForward)", desc = "Cycle forward through yank history" }, - { "]y", "(YankyCycleBackward)", desc = "Cycle backward through yank history" }, - { "]p", "(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" }, - { "[p", "(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" }, - { "]P", "(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" }, - { "[P", "(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" }, - { ">p", "(YankyPutIndentAfterShiftRight)", desc = "Put and indent right" }, - { "(YankyPutIndentAfterShiftLeft)", desc = "Put and indent left" }, + { "y", "(YankyYank)", mode = { "n", "x" }, desc = "Yank text" }, + { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after cursor" }, + { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before cursor" }, + { "gp", "(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after selection" }, + { "gP", "(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before selection" }, + { "[y", "(YankyCycleForward)", desc = "Cycle forward through yank history" }, + { "]y", "(YankyCycleBackward)", desc = "Cycle backward through yank history" }, + { "]p", "(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" }, + { "[p", "(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" }, + { "]P", "(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" }, + { "[P", "(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" }, + { ">p", "(YankyPutIndentAfterShiftRight)", desc = "Put and indent right" }, + { "(YankyPutIndentAfterShiftLeft)", desc = "Put and indent left" }, { ">P", "(YankyPutIndentBeforeShiftRight)", desc = "Put before and indent right" }, - { "(YankyPutIndentBeforeShiftLeft)", desc = "Put before and indent left" }, - { "=p", "(YankyPutAfterFilter)", desc = "Put after applying a filter" }, - { "=P", "(YankyPutBeforeFilter)", desc = "Put before applying a filter" }, + { "(YankyPutIndentBeforeShiftLeft)", desc = "Put before and indent left" }, + { "=p", "(YankyPutAfterFilter)", desc = "Put after applying a filter" }, + { "=P", "(YankyPutBeforeFilter)", desc = "Put before applying a filter" }, }, }, - + -- Enhanced matchparen.vim plugin for Neovim to highlight the outer pair. { "utilyre/sentiment.nvim", @@ -140,11 +153,12 @@ return { -- joining blocks of code into oneline, or splitting one line into multiple lines. { - 'Wansmer/treesj', - keys = { 'm', 'j', 's' }, - dependencies = { 'nvim-treesitter/nvim-treesitter' }, + "Wansmer/treesj", + keys = { "m", "j", "s" }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, config = function() - require('treesj').setup({--[[ your config ]]}) + require("treesj").setup({ --[[ your config ]] + }) end, }, @@ -154,31 +168,31 @@ return { opts = { filesystem = { filtered_items = { - visible = true, -- visible by default + visible = true, -- visible by default hide_dotfiles = false, hide_gitignored = false, }, }, - } + }, }, -- The plugin offers the alibity to refactor code. { "ThePrimeagen/refactoring.nvim", dependencies = { - {"nvim-lua/plenary.nvim"}, - {"nvim-treesitter/nvim-treesitter"} - } + { "nvim-lua/plenary.nvim" }, + { "nvim-treesitter/nvim-treesitter" }, + }, }, -- The plugin offers the abilibty to search and replace. { "nvim-pack/nvim-spectre", dependencies = { - {"nvim-lua/plenary.nvim"}, - } + { "nvim-lua/plenary.nvim" }, + }, }, -- full signature help, docs and completion for the nvim lua API. - { "folke/neodev.nvim", opts = {} }, + { "folke/neodev.nvim", opts = {} }, { "RRethy/vim-illuminate", config = function() end }, @@ -186,14 +200,14 @@ return { { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) - local utils = require "astronvim.utils"; + local utils = require("astronvim.utils") opts.incremental_selection = { enable = true, keymaps = { - init_selection = "", -- Ctrl + Space + init_selection = "", -- Ctrl + Space node_incremental = "", - scope_incremental = "", -- Alt + Space - node_decremental = "", -- Backspace + scope_incremental = "", -- Alt + Space + node_decremental = "", -- Backspace }, } opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { @@ -213,14 +227,14 @@ return { -- implementation/definition preview { - 'rmagatti/goto-preview', + "rmagatti/goto-preview", config = function() - require('goto-preview').setup {} - end + require("goto-preview").setup({}) + end, }, -- Undo tree - { "debugloop/telescope-undo.nvim", }, + { "debugloop/telescope-undo.nvim" }, -- Install lsp, formmatter and others via home manager instead of Mason.nvim -- LSP installations @@ -245,7 +259,7 @@ return { { "jose-elias-alvarez/null-ls.nvim", opts = function(_, opts) - local null_ls = require "null-ls" + local null_ls = require("null-ls") local code_actions = null_ls.builtins.code_actions local diagnostics = null_ls.builtins.diagnostics local formatting = null_ls.builtins.formatting @@ -258,40 +272,40 @@ return { code_actions.gitsigns, -- common refactoring actions based off the Refactoring book by Martin Fowler code_actions.refactoring, - code_actions.gomodifytags, -- Go - modify struct field tags - code_actions.impl, -- Go - generate interface method stubs + code_actions.gomodifytags, -- Go - modify struct field tags + code_actions.impl, -- Go - generate interface method stubs code_actions.shellcheck, - code_actions.proselint, -- English prose linter - code_actions.statix, -- Lints and suggestions for Nix. + code_actions.proselint, -- English prose linter + code_actions.statix, -- Lints and suggestions for Nix. -- Diagnostic - diagnostics.actionlint, -- GitHub Actions workflow syntax checking - diagnostics.buf, -- check text in current buffer - diagnostics.checkmake, -- check Makefiles - diagnostics.deadnix, -- Scan Nix files for dead code. + diagnostics.actionlint, -- GitHub Actions workflow syntax checking + diagnostics.buf, -- check text in current buffer + diagnostics.checkmake, -- check Makefiles + diagnostics.deadnix, -- Scan Nix files for dead code. -- Formatting - formatting.prettier, -- js/ts/vue/css/html/json/... formatter - diagnostics.hadolint, -- Dockerfile linter - formatting.black, -- Python formatter - formatting.ruff, -- extremely fast Python linter - formatting.goimports, -- Go formatter - formatting.shfmt, -- Shell formatter - formatting.rustfmt, -- Rust formatter - formatting.taplo, -- TOML formatteautoindentr - formatting.terraform_fmt, -- Terraform formatter - formatting.stylua, -- Lua formatter - formatting.alejandra, -- Nix formatter - formatting.sqlfluff.with({ -- SQL formatter - extra_args = { "--dialect", "postgres" }, -- change to your dialect + formatting.prettier, -- js/ts/vue/css/html/json/... formatter + diagnostics.hadolint, -- Dockerfile linter + formatting.black, -- Python formatter + formatting.ruff, -- extremely fast Python linter + formatting.goimports, -- Go formatter + formatting.shfmt, -- Shell formatter + formatting.rustfmt, -- Rust formatter + formatting.taplo, -- TOML formatteautoindentr + formatting.terraform_fmt, -- Terraform formatter + formatting.stylua, -- Lua formatter + formatting.alejandra, -- Nix formatter + formatting.sqlfluff.with({ -- SQL formatter + extra_args = { "--dialect", "postgres" }, -- change to your dialect }), - formatting.nginx_beautifier, -- Nginx formatter + formatting.nginx_beautifier, -- Nginx formatter null_ls.builtins.formatting.verible_verilog_format, -- Verilog formatter }) end end, }, - -- Debugger installation + -- Debugger installation { "jay-babu/mason-nvim-dap.nvim", -- overrides `require("mason-nvim-dap").setup(...)` @@ -302,8 +316,9 @@ return { }, { - 'nvim-telescope/telescope.nvim', branch = '0.1.x', - dependencies = { 'nvim-lua/plenary.nvim' }, + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { "nvim-lua/plenary.nvim" }, init = function() -- 1. Disable highlighting for certain filetypes -- 2. Ignore files larger than a certain filesize @@ -322,7 +337,9 @@ return { local new_maker = function(filepath, bufnr, opts) opts = opts or {} - if opts.use_ft_detect == nil then opts.use_ft_detect = true end + if opts.use_ft_detect == nil then + opts.use_ft_detect = true + end -- 1. Check if the file is in the bad_files array, and if so, don't highlight it opts.use_ft_detect = opts.use_ft_detect == false and false or bad_files(filepath) @@ -330,7 +347,9 @@ return { -- 2. Check the file size, and ignore it if it's too big(preview nothing). filepath = vim.fn.expand(filepath) vim.loop.fs_stat(filepath, function(_, stat) - if not stat then return end + if not stat then + return + end if stat.size > filesize_threshold then return else @@ -339,13 +358,13 @@ return { end) end - require("telescope").setup { + require("telescope").setup({ defaults = { buffer_previewer_maker = new_maker, - } - } + }, + }) end, - } + }, }, -- Configure require("lazy").setup() options @@ -354,7 +373,7 @@ return { performance = { rtp = { -- customize default disabled vim plugins - disabled_plugins = { }; + disabled_plugins = {}, }, }, }, @@ -373,36 +392,36 @@ return { -- enable servers that installed by home-manager instead of mason servers = { ---- Frontend & NodeJS - "tsserver", -- typescript/javascript language server - "tailwindcss", -- tailwindcss language server - "html", -- html language server - "cssls", -- css language server - "prismals", -- prisma language server - "volar", -- vue language server + "tsserver", -- typescript/javascript language server + "tailwindcss", -- tailwindcss language server + "html", -- html language server + "cssls", -- css language server + "prismals", -- prisma language server + "volar", -- vue language server ---- Configuration Language - "marksman", -- markdown ls - "jsonls", -- json language server - "yamlls", -- yaml language server - "taplo", -- toml language server + "marksman", -- markdown ls + "jsonls", -- json language server + "yamlls", -- yaml language server + "taplo", -- toml language server ---- Backend - "lua_ls", -- lua - "gopls", -- go - "rust_analyzer", -- rust - "pyright", -- python - "ruff_lsp", -- extremely fast Python linter and code transformation - "jdtls", -- java - "nil_ls", -- nix language server - "bufls", -- protocol buffer language server - "zls", -- zig language server + "lua_ls", -- lua + "gopls", -- go + "rust_analyzer", -- rust + "pyright", -- python + "ruff_lsp", -- extremely fast Python linter and code transformation + "jdtls", -- java + "nil_ls", -- nix language server + "bufls", -- protocol buffer language server + "zls", -- zig language server ---- HDL - "verible", -- verilog language server + "verible", -- verilog language server ---- Operation & Cloud Nativautoindente - "bashls", -- bash - "cmake", -- cmake language server - "clangd", -- c/c++ - "dockerls", -- dockerfile - "jsonnet_ls", -- jsonnet language server - "terraformls", -- terraform hcl + "bashls", -- bash + "cmake", -- cmake language server + "clangd", -- c/c++ + "dockerls", -- dockerfile + "jsonnet_ls", -- jsonnet language server + "terraformls", -- terraform hcl }, formatting = { disabled = {}, diff --git a/home/base/desktop/neovim/astronvim_user/mappings.lua b/home/base/desktop/neovim/astronvim_user/mappings.lua index 83807c97..488bc163 100644 --- a/home/base/desktop/neovim/astronvim_user/mappings.lua +++ b/home/base/desktop/neovim/astronvim_user/mappings.lua @@ -17,7 +17,12 @@ return { ["bn"] = { "tabnew", desc = "New tab" }, -- quick save [""] = { ":w!", desc = "Save File" }, -- change description but the same command - ["tp"] = { function() utils.toggle_term_cmd("ipython") end, desc = "ToggleTerm python" }, + + -- Terminal + -- NOTE: https://neovim.io/doc/user/builtin.html#jobstart() + -- 1. If {cmd} is a List it runs directly (no 'shell') + -- 2. If {cmd} is a String it runs in the 'shell' + ["tp"] = { function() utils.toggle_term_cmd({ cmd = "ipython" }) end, desc = "ToggleTerm python" }, -- search and replace globally ['ss'] = {'lua require("spectre").toggle()', desc = "Toggle Spectre" }, diff --git a/home/base/desktop/neovim/default.nix b/home/base/desktop/neovim/default.nix index eb906e5e..33a3091f 100644 --- a/home/base/desktop/neovim/default.nix +++ b/home/base/desktop/neovim/default.nix @@ -27,120 +27,152 @@ programs = { neovim = { enable = true; + defaultEditor = true; - - viAlias = false; + viAlias = true; vimAlias = true; - withPython3 = true; - withNodeJs = true; - - # Extra packages only available to nvim(won't pollute the global home environment) - extraPackages = with pkgs; - [ - #-- c/c++ - cmake - cmake-language-server - gnumake - checkmake - gcc # c/c++ compiler, required by nvim-treesitter! - llvmPackages.clang-unwrapped # c/c++ tools with clang-tools such as clangd - gdb - lldb - - #-- python - nodePackages.pyright # python language server - python311Packages.black # python formatter - python311Packages.ruff-lsp - - #-- rust - rust-analyzer - cargo # rust package manager - rustfmt - - #-- zig - zls - - #-- nix - nil - rnix-lsp - # nixd - statix # Lints and suggestions for the nix programming language - deadnix # Find and remove unused code in .nix source files - alejandra # Nix Code Formatter - - #-- golang - go - gomodifytags - iferr # generate error handling code for go - impl # generate function implementation for go - gotools # contains tools like: godoc, goimports, etc. - gopls # go language server - delve # go debugger - - # -- java - jdk17 - gradle - maven - spring-boot-cli - - #-- lua - stylua - lua-language-server - - #-- bash - nodePackages.bash-language-server - shellcheck - shfmt - - #-- javascript/typescript --# - nodePackages.typescript - nodePackages.typescript-language-server - # HTML/CSS/JSON/ESLint language servers extracted from vscode - nodePackages.vscode-langservers-extracted - nodePackages."@tailwindcss/language-server" - - #-- CloudNative - nodePackages.dockerfile-language-server-nodejs - # terraform # install via brew on macOS - terraform-ls - jsonnet - jsonnet-language-server - hadolint # Dockerfile linter - - #-- Others - taplo # TOML language server / formatter / validator - nodePackages.yaml-language-server - sqlfluff # SQL linter - actionlint # GitHub Actions linter - buf # protoc plugin for linting and formatting - proselint # English prose linter - guile # scheme language - - #-- Misc - tree-sitter # common language parser/highlighter - nodePackages.prettier # common code formatter - marksman # language server for markdown - glow # markdown previewer - fzf - - #-- Optional Requirements: - gdu # disk usage analyzer, required by AstroNvim - ripgrep # fast search tool, required by AstroNvim's 'fw'( is space key) - ] - ++ ( - if pkgs.stdenv.isDarwin - then [] - else [ - #-- verilog / systemverilog - verible - ] - ); - # currently we use lazy.nvim as neovim's package manager, so comment this one. # plugins = with pkgs.vimPlugins; [ # # search all the plugins using https://search.nixos.org/packages # ]; + + # Extra packages only available to nvim(won't pollute the global home environment) + extraPackages = with pkgs; let + nvim_extra = + [ + #-- c/c++ + cmake + cmake-language-server + gnumake + checkmake + gcc # c/c++ compiler, required by nvim-treesitter! + llvmPackages.clang-unwrapped # c/c++ tools with clang-tools such as clangd + gdb + lldb + + #-- python + nodePackages.pyright # python language server + python3Packages.black # python formatter + python3Packages.ruff-lsp + (python3.withPackages ( + ps: + with ps; [ + pynvim # Python client and plugin host for Nvim + + ipython + pandas + requests + pyquery + pyyaml + ] + )) + + #-- rust + rust-analyzer + cargo # rust package manager + rustfmt + + #-- zig + zls + + #-- nix + nil + rnix-lsp + # nixd + statix # Lints and suggestions for the nix programming language + deadnix # Find and remove unused code in .nix source files + alejandra # Nix Code Formatter + + #-- golang + go + gomodifytags + iferr # generate error handling code for go + impl # generate function implementation for go + gotools # contains tools like: godoc, goimports, etc. + gopls # go language server + delve # go debugger + + # -- java + jdk17 + gradle + maven + spring-boot-cli + + #-- lua + stylua + lua-language-server + + #-- bash + nodePackages.bash-language-server + shellcheck + shfmt + + #-- javascript/typescript --# + nodePackages.nodejs + nodePackages.typescript + nodePackages.typescript-language-server + # HTML/CSS/JSON/ESLint language servers extracted from vscode + nodePackages.vscode-langservers-extracted + nodePackages."@tailwindcss/language-server" + + #-- CloudNative + nodePackages.dockerfile-language-server-nodejs + # terraform # install via brew on macOS + terraform-ls + jsonnet + jsonnet-language-server + hadolint # Dockerfile linter + + #-- Others + taplo # TOML language server / formatter / validator + nodePackages.yaml-language-server + sqlfluff # SQL linter + actionlint # GitHub Actions linter + buf # protoc plugin for linting and formatting + proselint # English prose linter + guile # scheme language + + #-- Misc + tree-sitter # common language parser/highlighter + nodePackages.prettier # common code formatter + marksman # language server for markdown + glow # markdown previewer + fzf + + #-- Optional Requirements: + gdu # disk usage analyzer, required by AstroNvim + ripgrep # fast search tool, required by AstroNvim's 'fw'( is space key) + ] + ++ ( + if pkgs.stdenv.isDarwin + then [] + else [ + #-- verilog / systemverilog + verible + ] + ); + in + nvim_extra + ++ [ + # NOTE: shells installed by Nix will ignore the `PATH` env passed by parent process, + # so to access the packages we installed here in neovim's shell session(`:terminal`), + # we have to create a shell wrapper with the packages in `PATH` env. + (pkgs.runCommand "nvim-shell" rec { + nativeBuildInputs = + nvim_extra + ++ [ + pkgs.nushell + pkgs.bash + ]; + PATH = lib.makeBinPath nativeBuildInputs; + } '' + mkdir -p $out/bin + + ln -s ${pkgs.nushell}/bin/nu $out/bin/nvim-nushell + ln -s ${pkgs.bash}/bin/bash $out/bin/nvim-bash + '') + ]; }; }; } diff --git a/modules/darwin/apps.nix b/modules/darwin/apps.nix index ace10f3b..39d26f95 100644 --- a/modules/darwin/apps.nix +++ b/modules/darwin/apps.nix @@ -45,7 +45,7 @@ # homebrew need to be installed manually, see https://brew.sh homebrew = { - enable = true; + enable = false; onActivation = { autoUpdate = false;