diff --git a/home/default.nix b/home/default.nix index a06fb8d..7adf604 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,10 +1,18 @@ { + lib, pkgs, userName, + userEmail, ... -}: { +}: let + # Have a file sturcture that holds all the configuration files that can't be configured by Nix + # or maybe I'm too lazy to do anything about it? I dunno + dirs = { + defaults = ../defaults; + }; +in { # Import sub modules - imports = [ + imports = map (module: import module {inherit lib pkgs dirs userName userEmail;}) [ ./atuin.nix ./shell.nix ./core.nix diff --git a/home/neovim.nix b/home/neovim.nix index 1d3114c..0efa653 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -1,7 +1,14 @@ -{...}: { +{dirs, ...}: { programs.neovim = { enable = true; defaultEditor = true; vimAlias = true; }; + + xdg.configFile = { + nvim = { + onChange = "nvim --headless -c 'if exists(\":LuaCacheClear\") | :LuaCacheClear' +quitall"; + source = dirs.defaults + /nvim; + }; + }; }