diff --git a/config/default.nix b/config/default.nix index c8b1cd7..b3b896b 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,6 +1,60 @@ -{lib, ...}: let - definitions = lib.attrNames (lib.filterAttrs (filename: kind: - filename != "default.nix" && (kind == "regular" || kind == "directory")) - (builtins.readDir ./.)); -in - lib.mkMerge (map (file: import ./${file}) definitions) +{pkgs, ...}: { + imports = [./config ./plugins]; + + config = { + # Use as leader key + globals.mapleader = " "; + globals.maplocalleader = " "; + + # Set 'vi' and 'vim' aliases to nixvim + viAlias = true; + vimAlias = true; + + # Setup clipboard support + clipboard = { + # Use xsel as clipboard provider + # providers.xsel.enable = true; + + # Sync system clipboard + register = "unnamedplus"; + }; + extraPackages = with pkgs; [ + nix-inspect + nixd + git + git-lfs + cloc + ripgrep + lazygit + black + fd + ripgrep + ]; + + keymaps = [ + { + mode = "n"; + key = "gg"; + action = "LazyGit"; + options = { + desc = "LazyGit (root dir)"; + }; + } + ]; +extraPlugins = with pkgs.vimPlugins; [ + lazygit-nvim + ]; + + extraConfigLua = '' + require("telescope").load_extension("lazygit") + ''; + performance = { + byteCompileLua = { + enable = true; + nvimRuntime = true; + configs = true; + plugins = true; + }; + }; + }; +} diff --git a/default.nix b/default.nix deleted file mode 100644 index b3b896b..0000000 --- a/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{pkgs, ...}: { - imports = [./config ./plugins]; - - config = { - # Use as leader key - globals.mapleader = " "; - globals.maplocalleader = " "; - - # Set 'vi' and 'vim' aliases to nixvim - viAlias = true; - vimAlias = true; - - # Setup clipboard support - clipboard = { - # Use xsel as clipboard provider - # providers.xsel.enable = true; - - # Sync system clipboard - register = "unnamedplus"; - }; - extraPackages = with pkgs; [ - nix-inspect - nixd - git - git-lfs - cloc - ripgrep - lazygit - black - fd - ripgrep - ]; - - keymaps = [ - { - mode = "n"; - key = "gg"; - action = "LazyGit"; - options = { - desc = "LazyGit (root dir)"; - }; - } - ]; -extraPlugins = with pkgs.vimPlugins; [ - lazygit-nvim - ]; - - extraConfigLua = '' - require("telescope").load_extension("lazygit") - ''; - performance = { - byteCompileLua = { - enable = true; - nvimRuntime = true; - configs = true; - plugins = true; - }; - }; - }; -} diff --git a/flake.nix b/flake.nix index 2c0fcc5..8203217 100644 --- a/flake.nix +++ b/flake.nix @@ -41,9 +41,7 @@ mkNixvim = specialArgs: nixvim.legacyPackages.${system}.makeNixvimWithModule { inherit pkgs; - - module = ./.; - + module = ./config; extraSpecialArgs = specialArgs // {