about summary refs log tree commit diff
path: root/modules/darwin/vim
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-07-03 11:27:19 +0300
committerAzat Bahawi <azat@bahawi.net>2023-07-03 11:27:19 +0300
commitc80598d4e4ffea73647b2ea8440a6080596968fe (patch)
treea6ca4bb82ec20df18022988fa359126fc877d5da /modules/darwin/vim
parent2023-06-21 (diff)
2023-07-03
Diffstat (limited to 'modules/darwin/vim')
-rw-r--r--modules/darwin/vim/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/darwin/vim/default.nix b/modules/darwin/vim/default.nix
new file mode 100644
index 0000000..519f120
--- /dev/null
+++ b/modules/darwin/vim/default.nix
@@ -0,0 +1,26 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.vim;
+in {
+  config = mkIf cfg.enable {
+    programs.vim.package =
+      (pkgs.macvim.overrideAttrs (_: final: {
+        # TODO https://github.com/NixOS/nixpkgs/pull/239842
+        configureFlags =
+          final.configureFlags
+          ++ [
+            "--disable-perlinterp"
+            "--disable-rubyinterp"
+          ];
+      }))
+      .configure (with cfg; {
+        customRC = rc;
+        packages.myVimPackage.start = plugins;
+      });
+  };
+}

Consider giving Nix/NixOS a try! <3