summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.nix5
-rw-r--r--users/sils/nixvim/config.nix89
-rw-r--r--users/sils/nixvim/default.nix97
3 files changed, 100 insertions, 91 deletions
diff --git a/flake.nix b/flake.nix
index e9636b3..5236972 100644
--- a/flake.nix
+++ b/flake.nix
@@ -151,6 +151,7 @@
       overlays = [nixvim.overlays.default];
     };
     sysLib = shell_library.lib.${system};
+    nixVimConfig = import ./users/sils/nixvim/config.nix;
     defaultModules = [
       impermanence.nixosModules.impermanence
       lanzaboote.nixosModules.lanzaboote
@@ -200,5 +201,9 @@
       };
 
       formatter = pkgs.alejandra;
+
+      packages = {
+        nvim = nixvim.legacyPackages."${system}".makeNixvim nixVimConfig;
+      };
     });
 }
diff --git a/users/sils/nixvim/config.nix b/users/sils/nixvim/config.nix
new file mode 100644
index 0000000..c6f6061
--- /dev/null
+++ b/users/sils/nixvim/config.nix
@@ -0,0 +1,89 @@
+let
+  maps = import ./maps;
+in {
+  options = {
+    number = true;
+    relativenumber = true;
+    shiftwidth = 2;
+    tabstop = 2;
+    scrolloff = 999;
+
+    textwidth = 83;
+    linebreak = true;
+  };
+  colorschemes.gruvbox.enable = true;
+  inherit maps;
+  plugins = {
+    airline = {
+      enable = true;
+      powerline = true;
+      theme = "minimalist";
+    };
+    coq-nvim = {
+      enable = true;
+      autoStart = "shut-up";
+      installArtifacts = true;
+    };
+    dashboard = {
+      enable = true;
+    };
+    lsp = {
+      enable = true;
+      servers = {
+        nil_ls.enable = true;
+        rust-analyzer = {
+          enable = true;
+          installCargo = true;
+          installRustc = true;
+        };
+        ltex.enable = true;
+      };
+    };
+    lsp-format = {
+      enable = true;
+    };
+    quickmath.enable = true;
+    treesitter = {
+      enable = true;
+      indent = true;
+    };
+    treesitter-context = {
+      enable = true;
+    };
+    treesitter-refactor = {
+      enable = true;
+    };
+    mini = {
+      enable = true;
+    };
+    markdown-preview = {
+      enable = true;
+    };
+    nix = {
+      enable = true;
+    };
+    neo-tree = {
+      enable = true;
+      autoCleanAfterSessionRestore = true;
+      closeIfLastWindow = true;
+    };
+    nvim-autopairs = {
+      enable = true;
+    };
+    nvim-cmp = {
+      enable = false;
+      mappingPresets = ["insert" "cmdline"];
+      preselect = "None";
+      sources = [
+        {name = "nvim_lsp";}
+        {name = "path";}
+        {name = "buffer";}
+        {name = "git";}
+        {name = "conventionalcommits";}
+      ];
+    };
+    vimtex = {
+      enable = true;
+    };
+  };
+}
diff --git a/users/sils/nixvim/default.nix b/users/sils/nixvim/default.nix
index 3fa9b22..0e770f9 100644
--- a/users/sils/nixvim/default.nix
+++ b/users/sils/nixvim/default.nix
@@ -1,92 +1,7 @@
-let
-  maps = import ./maps;
-in {
-  programs.nixvim = {
-    enable = true;
-    options = {
-      number = true;
-      relativenumber = true;
-      shiftwidth = 2;
-      tabstop = 2;
-      scrolloff = 999;
-
-      textwidth = 83;
-      linebreak = true;
-    };
-    colorschemes.gruvbox.enable = true;
-    inherit maps;
-    plugins = {
-      airline = {
-        enable = true;
-        powerline = true;
-        theme = "minimalist";
-      };
-      coq-nvim = {
-        enable = true;
-        autoStart = "shut-up";
-        installArtifacts = true;
-      };
-      dashboard = {
-        enable = true;
-      };
-      lsp = {
-        enable = true;
-        servers = {
-          nil_ls.enable = true;
-          rust-analyzer = {
-            enable = true;
-            installCargo = true;
-            installRustc = true;
-          };
-          ltex.enable = true;
-        };
-      };
-      lsp-format = {
-        enable = true;
-      };
-      quickmath.enable = true;
-      treesitter = {
-        enable = true;
-        indent = true;
-      };
-      treesitter-context = {
-        enable = true;
-      };
-      treesitter-refactor = {
-        enable = true;
-      };
-      mini = {
-        enable = true;
-      };
-      markdown-preview = {
-        enable = true;
-      };
-      nix = {
-        enable = true;
-      };
-      neo-tree = {
-        enable = true;
-        autoCleanAfterSessionRestore = true;
-        closeIfLastWindow = true;
-      };
-      nvim-autopairs = {
-        enable = true;
-      };
-      nvim-cmp = {
-        enable = false;
-        mappingPresets = ["insert" "cmdline"];
-        preselect = "None";
-        sources = [
-          {name = "nvim_lsp";}
-          {name = "path";}
-          {name = "buffer";}
-          {name = "git";}
-          {name = "conventionalcommits";}
-        ];
-      };
-      vimtex = {
-        enable = true;
-      };
-    };
-  };
+{
+  programs.nixvim =
+    {
+      enable = true;
+    }
+    // import ./config.nix;
 }