diff --git a/tests/modules/programs/nushell/default.nix b/tests/modules/programs/nushell/default.nix index 52d9b3c7..bdf14d56 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 00000000..818cf7f6 --- /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}" + ''; +}