summaryrefslogtreecommitdiffstats
path: root/modules/desktop/apps/editors
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/apps/editors')
-rw-r--r--modules/desktop/apps/editors/neovim.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules/desktop/apps/editors/neovim.nix b/modules/desktop/apps/editors/neovim.nix
new file mode 100644
index 0000000..77857a2
--- /dev/null
+++ b/modules/desktop/apps/editors/neovim.nix
@@ -0,0 +1,42 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ nvimConf = config.modules.desktop.apps.editors.neovim;
+ configDir = config.nixosConfig.configDir;
+in {
+ options.modules.desktop.apps.editors.neovim = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf (nvimConf.enable) {
+
+ home.manager.xdg.configFile."nvim/init.vim".source = "${configDir}/nvim/init.vim";
+ home.manager.xdg.configFile."nvim/lua/init.lua".source = "${configDir}/nvim/init.lua";
+ home.manager.xdg.configFile."nvim/lua/plugins.lua".source = "${configDir}/nvim/plugins.lua";
+
+ modules.desktop.defaultApplications.apps.editor = rec {
+ package = pkgs.neovim;
+ install = false;
+ cmd = "${package}/bin/nvim";
+ desktop = "nvim";
+ };
+
+ home.packages = [
+
+ ];
+
+ home.manager.programs.neovim = {
+ enable = true;
+ viAlias = true;
+ vimAlias = true;
+ withNodeJs = true;
+ };
+ };
+}