- install
nix
, enableflakes
- install homebrew
- clone to
~/nixfiles
- run
bin/switch
- run
brew-up
to install any Homebrew software defined in the created~/.Brewfile
(we could usenix-darwin
, but it introduces a lot of complexity and you still need to install homebrew manually anyways... not totally worth the lift. But if I ever change my mind there's a working spike (as of 2024-02-18) at https://github.com/flyinggrizzly/nixfiles/tree/nix-darwin-spike)
- home-manager + nix-darwin: https://xyno.space/post/nix-darwin-introduction
- chris portela blowing my mind
- configuring LSP servers without Mason on nix
- using LazyVim as a reference, but the "add to
extraPackages
part is the important bit" - used kickstart.nvim for a lot of the basic telescope/lsp/etc setup:
- using LazyVim as a reference, but the "add to
We ain't using any vim package managers, as nice as lazy.vim is--most things are packaged by nix, and the update process for packages is harder when managing 2 different lockfiles.
Process:
- add the nix package from https://seach.nixos.org, into
programs.neovim.plugins
- if the packages isn't in
pkgs.vimPlugins
, you can add it manually withpkgs.vimUtils.buildVimPlugin
- if it's from a github repo, you can also use the custom function
% nix-git-sha
helper to generate the sha256 value to lock it
- if the packages isn't in
- for language servers, we're not using
mason.nvim
to handle installation. Instead these also need to get installed with nix (or with the software project like for Sorbet/Ruby/Rubocop--there's handling inplugin_config/lsp.lua
for missing servers), intoprograms.neovim.extraPackages
- once that's done, you should be able to reference the language server normally from the LSP setup process
- similarly, for treesitter, rather than use
mason
to install the necessary grammars, we're just using thenvim-treesitter.withAllGrammars
plugin nix package. We could do it piecemeal, but it's not worth the hassle to me - set up any necessary neovim config, probably in
lib/nvim/lua/plugin_config/MY_PLUGIN.lua