diff --git a/tests/modules/programs/nushell/default.nix b/tests/modules/programs/nushell/default.nix index 52d9b3c7b..bdf14d56d 100644 --- a/tests/modules/programs/nushell/default.nix +++ b/tests/modules/programs/nushell/default.nix @@ -1 +1,4 @@ -{ nushell-example-settings = ./example-settings.nix; } +{ + nushell-example-settings = ./example-settings.nix; + nushell-plugins = ./plugins.nix; +} diff --git a/tests/modules/programs/nushell/plugins.nix b/tests/modules/programs/nushell/plugins.nix new file mode 100644 index 000000000..818cf7f68 --- /dev/null +++ b/tests/modules/programs/nushell/plugins.nix @@ -0,0 +1,22 @@ +{ pkgs, config, ... }: + +{ + programs.nushell = { + enable = true; + plugins = + builtins.attrValues { inherit (pkgs.nushellPlugins) formats gstat; }; + }; + + test.stubs."nushellPlugins.formats" = { }; + + nmt.script = let + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then + "home-files/Library/Application Support/nushell" + else + "home-files/.config/nushell"; + pluginFile = "${configDir}/plugin.msgpackz"; + + in '' + assertFileExists "${pluginFile}" + ''; +}