diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2024-01-07 12:00:08 -0500 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2024-01-07 12:00:08 -0500 |
commit | 7b79203f54853733d4fae88943829d0e24e6e49f (patch) | |
tree | a352d199fad7453332b9308a6295164157729f27 /modules/desktop/apps/editors | |
parent | 184bd30bcb303104a4981ac742d8f8961c5477e7 (diff) | |
download | nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.gz nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.bz2 nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.zip |
massive overhaul
Diffstat (limited to 'modules/desktop/apps/editors')
-rw-r--r-- | modules/desktop/apps/editors/neovim.nix | 42 |
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; + }; + }; +} |