From 3f47f72c97ec23d117d9ce6ad15a42552cfce66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Tri=C3=B1anes?= Date: Tue, 16 Sep 2025 14:35:17 +0200 Subject: [PATCH] mise: disable shell integration when package == null There's a warning already in place for this, but instead of skipping the shell integration the build process would fail due to `lib.getExe` being passed a null value. --- modules/programs/mise.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/programs/mise.nix b/modules/programs/mise.nix index 597d7e170..0dfe066e8 100644 --- a/modules/programs/mise.nix +++ b/modules/programs/mise.nix @@ -116,19 +116,19 @@ in }; programs = { - bash.initExtra = mkIf cfg.enableBashIntegration '' + bash.initExtra = mkIf (cfg.enableBashIntegration && cfg.package != null) '' eval "$(${getExe cfg.package} activate bash)" ''; - zsh.initContent = mkIf cfg.enableZshIntegration '' + zsh.initContent = mkIf (cfg.enableZshIntegration && cfg.package != null) '' eval "$(${getExe cfg.package} activate zsh)" ''; - fish.interactiveShellInit = mkIf cfg.enableFishIntegration '' + fish.interactiveShellInit = mkIf (cfg.enableFishIntegration && cfg.package != null) '' ${getExe cfg.package} activate fish | source ''; - nushell = mkIf cfg.enableNushellIntegration { + nushell = mkIf (cfg.enableNushellIntegration && cfg.package != null) { extraEnv = '' let mise_path = $nu.default-config-dir | path join mise.nu ^mise activate nu | save $mise_path --force