From 53cacafd9be391e5ec41f688846edd1e1830c822 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 2 Apr 2025 10:01:35 -0500 Subject: [PATCH] treewide: nushell build time configs suffixed Add filetype suffix for LSP/tree-sitter support. --- modules/programs/atuin.nix | 2 +- modules/programs/carapace.nix | 2 +- modules/programs/nix-your-shell.nix | 2 +- modules/programs/oh-my-posh.nix | 2 +- modules/programs/pay-respects.nix | 2 +- modules/programs/starship.nix | 2 +- modules/programs/zoxide.nix | 2 +- tests/modules/programs/carapace/nushell.nix | 2 +- tests/modules/programs/nix-your-shell/enable-shells.nix | 2 +- tests/modules/programs/oh-my-posh/nushell.nix | 2 +- tests/modules/programs/pay-respects/integration-disabled.nix | 2 +- tests/modules/programs/pay-respects/integration-enabled.nix | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index 66ace1b0..aa21773f 100644 --- a/modules/programs/atuin.nix +++ b/modules/programs/atuin.nix @@ -124,7 +124,7 @@ in { programs.nushell = mkIf cfg.enableNushellIntegration { extraConfig = '' source ${ - pkgs.runCommand "atuin-nushell-config" { } '' + pkgs.runCommand "atuin-nushell-config.nu" { } '' ${lib.getExe cfg.package} init nu ${flagsStr} >> "$out" '' } diff --git a/modules/programs/carapace.nix b/modules/programs/carapace.nix index df5fa300..122f65ce 100644 --- a/modules/programs/carapace.nix +++ b/modules/programs/carapace.nix @@ -44,7 +44,7 @@ in { nushell = lib.mkIf cfg.enableNushellIntegration { extraConfig = '' source ${ - pkgs.runCommand "carapace-nushell-config" { } '' + pkgs.runCommand "carapace-nushell-config.nu" { } '' ${bin} _carapace nushell >> "$out" '' } diff --git a/modules/programs/nix-your-shell.nix b/modules/programs/nix-your-shell.nix index bcbc58bd..6e9619f2 100644 --- a/modules/programs/nix-your-shell.nix +++ b/modules/programs/nix-your-shell.nix @@ -31,7 +31,7 @@ in { nushell = lib.mkIf cfg.enableNushellIntegration { extraConfig = '' source ${ - pkgs.runCommand "nix-your-shell-nushell-config" { } '' + pkgs.runCommand "nix-your-shell-nushell-config.nu" { } '' ${lib.getExe cfg.package} nu >> "$out" '' } diff --git a/modules/programs/oh-my-posh.nix b/modules/programs/oh-my-posh.nix index 16c391c9..72e8cce4 100644 --- a/modules/programs/oh-my-posh.nix +++ b/modules/programs/oh-my-posh.nix @@ -82,7 +82,7 @@ in { programs.nushell = mkIf cfg.enableNushellIntegration { extraConfig = '' source ${ - pkgs.runCommand "oh-my-posh-nushell-config" { } '' + pkgs.runCommand "oh-my-posh-nushell-config.nu" { } '' ${ lib.getExe cfg.package } init nu ${configArgument} --print >> "$out" diff --git a/modules/programs/pay-respects.nix b/modules/programs/pay-respects.nix index cfbd3dc1..615c1be5 100644 --- a/modules/programs/pay-respects.nix +++ b/modules/programs/pay-respects.nix @@ -51,7 +51,7 @@ in { nushell.extraConfig = lib.mkIf cfg.enableNushellIntegration '' source ${ - pkgs.runCommand "pay-respects-nushell-config" { } '' + pkgs.runCommand "pay-respects-nushell-config.nu" { } '' ${payRespectsCmd} nushell ${cfgOptions} >> "$out" '' } diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index 77bd4cd7..bef6acfc 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -128,7 +128,7 @@ in { # not done here. extraConfig = '' use ${ - pkgs.runCommand "starship-nushell-config" { } '' + pkgs.runCommand "starship-nushell-config.nu" { } '' ${lib.getExe cfg.package} init nu >> "$out" '' } diff --git a/modules/programs/zoxide.nix b/modules/programs/zoxide.nix index 29c8a121..0fa6c9ac 100644 --- a/modules/programs/zoxide.nix +++ b/modules/programs/zoxide.nix @@ -53,7 +53,7 @@ in { programs.nushell = lib.mkIf cfg.enableNushellIntegration { extraConfig = '' source ${ - pkgs.runCommand "zoxide-nushell-config" { } '' + pkgs.runCommand "zoxide-nushell-config.nu" { } '' ${lib.getExe cfg.package} init nushell ${cfgOptions} >> "$out" '' } diff --git a/tests/modules/programs/carapace/nushell.nix b/tests/modules/programs/carapace/nushell.nix index 285e902e..3fc36692 100644 --- a/tests/modules/programs/carapace/nushell.nix +++ b/tests/modules/programs/carapace/nushell.nix @@ -16,6 +16,6 @@ in '' assertFileExists "${configDir}/config.nu" assertFileRegex "${configDir}/config.nu" \ - 'source /nix/store/[^/]*-carapace-nushell-config' + 'source /nix/store/[^/]*-carapace-nushell-config.nu' ''; } diff --git a/tests/modules/programs/nix-your-shell/enable-shells.nix b/tests/modules/programs/nix-your-shell/enable-shells.nix index cb242aed..c593fd2b 100644 --- a/tests/modules/programs/nix-your-shell/enable-shells.nix +++ b/tests/modules/programs/nix-your-shell/enable-shells.nix @@ -29,7 +29,7 @@ assertFileExists ${nushellConfigDir}/config.nu assertFileRegex \ ${nushellConfigDir}/config.nu \ - 'source /nix/store/[^/]*-nix-your-shell-nushell-config' + 'source /nix/store/[^/]*-nix-your-shell-nushell-config.nu' assertFileExists home-files/.zshrc assertFileRegex \ diff --git a/tests/modules/programs/oh-my-posh/nushell.nix b/tests/modules/programs/oh-my-posh/nushell.nix index ec88df50..a3fac426 100644 --- a/tests/modules/programs/oh-my-posh/nushell.nix +++ b/tests/modules/programs/oh-my-posh/nushell.nix @@ -21,6 +21,6 @@ assertFileExists "${configFile}" assertFileRegex \ "${configFile}" \ - 'source /nix/store/[^/]*-oh-my-posh-nushell-config' + 'source /nix/store/[^/]*-oh-my-posh-nushell-config.nu' ''; } diff --git a/tests/modules/programs/pay-respects/integration-disabled.nix b/tests/modules/programs/pay-respects/integration-disabled.nix index f973fdbd..d3d2611a 100644 --- a/tests/modules/programs/pay-respects/integration-disabled.nix +++ b/tests/modules/programs/pay-respects/integration-disabled.nix @@ -19,6 +19,6 @@ assertFileNotRegex home-files/.bashrc '/nix/store/[^/]*-pay-respects-[^/]*/bin/pay-respects' assertFileNotRegex home-files/.zshrc '/nix/store/[^/]*-pay-respects-[^/]*/bin/pay-respects' assertFileNotRegex home-files/.config/fish/config.fish '/nix/store/[^/]*-pay-respects-[^/]*/bin/pay-respects' - assertFileNotRegex home-files/.config/nushell/config.nu 'source /nix/store/[^/]*-pay-respects-nushell-config' + assertFileNotRegex home-files/.config/nushell/config.nu 'source /nix/store/[^/]*-pay-respects-nushell-config.nu' ''; } diff --git a/tests/modules/programs/pay-respects/integration-enabled.nix b/tests/modules/programs/pay-respects/integration-enabled.nix index e703f363..9225df23 100644 --- a/tests/modules/programs/pay-respects/integration-enabled.nix +++ b/tests/modules/programs/pay-respects/integration-enabled.nix @@ -30,6 +30,6 @@ assertFileExists home-files/.config/nushell/config.nu assertFileRegex \ home-files/.config/nushell/config.nu \ - 'source /nix/store/[^/]*-pay-respects-nushell-config' + 'source /nix/store/[^/]*-pay-respects-nushell-config.nu' ''; }