Skip to content

Commit

Permalink
nushell: fix nushell config path on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp-M authored Apr 14, 2024
1 parent 4cc3c91 commit 630a099
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion modules/programs/nushell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions tests/modules/programs/carapace/nushell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:

{
programs = {
Expand All @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions tests/modules/programs/direnv/nushell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:

{
programs.nushell.enable = true;
Expand All @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions tests/modules/programs/nushell/example-settings.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:

{
programs.nushell = {
Expand Down Expand Up @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions tests/modules/programs/oh-my-posh/nushell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:

{
programs = {
Expand All @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions tests/modules/programs/yazi/nushell-integration-enabled.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:

let
shellIntegration = ''
Expand All @@ -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";
Expand Down

0 comments on commit 630a099

Please sign in to comment.