diff --git a/flake.lock b/flake.lock index 400135e..623170d 100644 --- a/flake.lock +++ b/flake.lock @@ -92,6 +92,22 @@ "type": "github" } }, + "d2-vim": { + "flake": false, + "locked": { + "lastModified": 1667932291, + "narHash": "sha256-NgZqZYDgW31/qm6X9AW3IjhNAVOaQHRq6z7y4vANB0g=", + "owner": "terrastruct", + "repo": "d2-vim", + "rev": "d1cb1e7e22bc0fb4d4034a1b93c2a13cc471acc6", + "type": "github" + }, + "original": { + "owner": "terrastruct", + "repo": "d2-vim", + "type": "github" + } + }, "editorconfig-nvim": { "flake": false, "locked": { @@ -624,6 +640,7 @@ "root": { "inputs": { "agenix": "agenix", + "d2-vim": "d2-vim", "flake-utils": "flake-utils", "hardware": "hardware", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 96b2ca4..a1acb41 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,11 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.utils.follows = "flake-utils"; }; + + d2-vim = { + url = "github:terrastruct/d2-vim"; + flake = false; + }; }; outputs = inputs @ { self, flake-utils, nixpkgs, ... }: diff --git a/users/jan/default.nix b/users/jan/default.nix index 8701955..3c2a067 100644 --- a/users/jan/default.nix +++ b/users/jan/default.nix @@ -1,5 +1,16 @@ { config, pkgs, lib, inputs, extraHomeModule ? null, ... }: +let + d2-vim-overlay = final: prev: { + vimPlugins = prev.vimPlugins // { + d2-vim = prev.vimUtils.buildVimPluginFrom2Nix { + name = "vim-d2"; + src = inputs.d2-vim; + }; + }; + }; + +in { nixpkgs.overlays = lib.mkAfter [ inputs.myneovim.overlays.default @@ -7,6 +18,7 @@ inputs.nil.overlays.default inputs.vnetod.overlays.default inputs.wired.overlays.default + d2-vim-overlay ]; programs.zsh.enable = true; diff --git a/users/modules/editor.nix b/users/modules/editor.nix index 9ca3662..ce7fa23 100644 --- a/users/modules/editor.nix +++ b/users/modules/editor.nix @@ -7,6 +7,7 @@ let enableDevIcons = true; enableTabby = true; enableOrgMode = true; + extraPlugins = [ pkgs.vimPlugins.d2-vim ]; grammarFileTypes = [ "nix" "lua"