diff --git a/modules/programs/nushell.nix b/modules/programs/nushell.nix index 5141997168c5..2ebd9554c929 100644 --- a/modules/programs/nushell.nix +++ b/modules/programs/nushell.nix @@ -6,7 +6,7 @@ let cfg = config.programs.nushell; - configDir = if pkgs.stdenv.isDarwin then + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then "Library/Application Support/nushell" else "${config.xdg.configHome}/nushell"; diff --git a/tests/modules/programs/carapace/nushell.nix b/tests/modules/programs/carapace/nushell.nix index a025da18c35d..d97fa8985850 100644 --- a/tests/modules/programs/carapace/nushell.nix +++ b/tests/modules/programs/carapace/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs = { @@ -7,7 +7,7 @@ }; nmt.script = let - configDir = if pkgs.stdenv.isDarwin then + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell" else "home-files/.config/nushell"; diff --git a/tests/modules/programs/direnv/nushell.nix b/tests/modules/programs/direnv/nushell.nix index 46f34ebd8a4c..6655f01a8c6d 100644 --- a/tests/modules/programs/direnv/nushell.nix +++ b/tests/modules/programs/direnv/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs.nushell.enable = true; @@ -7,7 +7,7 @@ test.stubs.nushell = { }; nmt.script = let - configFile = if pkgs.stdenv.isDarwin then + configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/config.nu" else "home-files/.config/nushell/config.nu"; diff --git a/tests/modules/programs/nushell/example-settings.nix b/tests/modules/programs/nushell/example-settings.nix index 73038584b628..d870eb9db0ee 100644 --- a/tests/modules/programs/nushell/example-settings.nix +++ b/tests/modules/programs/nushell/example-settings.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs.nushell = { @@ -34,7 +34,7 @@ test.stubs.nushell = { }; nmt.script = let - configDir = if pkgs.stdenv.isDarwin then + configDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell" else "home-files/.config/nushell"; diff --git a/tests/modules/programs/oh-my-posh/nushell.nix b/tests/modules/programs/oh-my-posh/nushell.nix index ad77f821aa14..da4ffafd360b 100644 --- a/tests/modules/programs/oh-my-posh/nushell.nix +++ b/tests/modules/programs/oh-my-posh/nushell.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs = { @@ -16,12 +16,12 @@ }; nmt.script = let - configFile = if pkgs.stdenv.isDarwin then + configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/config.nu" else "home-files/.config/nushell/config.nu"; - envFile = if pkgs.stdenv.isDarwin then + envFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/env.nu" else "home-files/.config/nushell/env.nu"; diff --git a/tests/modules/programs/yazi/nushell-integration-enabled.nix b/tests/modules/programs/yazi/nushell-integration-enabled.nix index ddd041dc043b..9adbaa982899 100644 --- a/tests/modules/programs/yazi/nushell-integration-enabled.nix +++ b/tests/modules/programs/yazi/nushell-integration-enabled.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: let shellIntegration = '' @@ -23,7 +23,7 @@ in { test.stubs.yazi = { }; nmt.script = let - configPath = if pkgs.stdenv.isDarwin then + configPath = if pkgs.stdenv.isDarwin && !config.xdg.enable then "home-files/Library/Application Support/nushell/config.nu" else "home-files/.config/nushell/config.nu";