From 3ad22341a27c856a8dd390ef7a036e0007153acf Mon Sep 17 00:00:00 2001 From: Mika Naylor Date: Sat, 24 Dec 2022 14:00:20 +0100 Subject: [PATCH] direnv: enable nushell integration This enables nushell integration by default for direnv, similar to bash/zsh/fish. The slightly verbose way of setting this is to ensure that peoples' existing nushell configuration isn't overwritten, only appended to, as would be the case if we just used the integration example from the nushell docs: https://www.nushell.sh/cookbook/direnv.html Closes #3520 --- modules/programs/direnv.nix | 25 +++++++++++++++++++++++ tests/modules/programs/direnv/default.nix | 1 + tests/modules/programs/direnv/nushell.nix | 19 +++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 tests/modules/programs/direnv/nushell.nix diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index ad294b2e..1d6ef212 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -80,6 +80,15 @@ in { ''; }; + enableNushellIntegration = mkOption { + default = true; + type = types.bool; + readOnly = true; + description = '' + Whether to enable Nushell integration. + ''; + }; + nix-direnv = { enable = mkEnableOption ''