From 6f47dbd11a69e715edff3e8f01fa529ca95629cb Mon Sep 17 00:00:00 2001 From: Frothy <76622149+FrothyMarrow@users.noreply.github.com> Date: Sun, 11 Feb 2024 09:28:04 -0500 Subject: [PATCH] filetree/nvimtree: fix default systemOpen on darwin --- modules/filetree/nvimtree/nvimtree.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/filetree/nvimtree/nvimtree.nix b/modules/filetree/nvimtree/nvimtree.nix index 3e68f8a..2112577 100644 --- a/modules/filetree/nvimtree/nvimtree.nix +++ b/modules/filetree/nvimtree/nvimtree.nix @@ -191,7 +191,12 @@ in { }; cmd = mkOption { - default = "${pkgs.xdg-utils}/bin/xdg-open"; + default = + if pkgs.stdenv.isDarwin + then "open" + else if pkgs.stdenv.isLinux + then "${pkgs.xdg-utils}/bin/xdg-open" + else throw "NvimTree: No default system open command for this platform, please set `vim.filetree.nvimTree.systemOpen.cmd`"; description = "The open command itself"; type = types.str; };