From 5b9156fa9a8b8beba917b8f9adbfd27bf63e16af Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Wed, 7 Feb 2024 08:45:44 +0100 Subject: [PATCH] zellij: use full executable path --- modules/programs/zellij.nix | 7 ++++--- tests/modules/programs/zellij/enable-shells.nix | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/programs/zellij.nix b/modules/programs/zellij.nix index 44a3d69f4..0906a028d 100644 --- a/modules/programs/zellij.nix +++ b/modules/programs/zellij.nix @@ -6,6 +6,7 @@ let cfg = config.programs.zellij; yamlFormat = pkgs.formats.yaml { }; + zellijCmd = getExe cfg.package; in { meta.maintainers = [ hm.maintainers.mainrs ]; @@ -69,16 +70,16 @@ in { }; programs.bash.initExtra = mkIf cfg.enableBashIntegration (mkOrder 200 '' - eval "$(zellij setup --generate-auto-start bash)" + eval "$(${zellijCmd} setup --generate-auto-start bash)" ''); programs.zsh.initExtra = mkIf cfg.enableZshIntegration (mkOrder 200 '' - eval "$(zellij setup --generate-auto-start zsh)" + eval "$(${zellijCmd} setup --generate-auto-start zsh)" ''); programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration (mkOrder 200 '' - eval (zellij setup --generate-auto-start fish | string collect) + eval (${zellijCmd} setup --generate-auto-start fish | string collect) ''); }; } diff --git a/tests/modules/programs/zellij/enable-shells.nix b/tests/modules/programs/zellij/enable-shells.nix index b8f800939..c648cf7dd 100644 --- a/tests/modules/programs/zellij/enable-shells.nix +++ b/tests/modules/programs/zellij/enable-shells.nix @@ -26,16 +26,16 @@ assertFileExists home-files/.bashrc assertFileContains \ home-files/.bashrc \ - 'eval "$(zellij setup --generate-auto-start bash)"' + 'eval "$(@zellij@/bin/dummy setup --generate-auto-start bash)"' assertFileExists home-files/.zshrc assertFileContains \ home-files/.zshrc \ - 'eval "$(zellij setup --generate-auto-start zsh)"' + 'eval "$(@zellij@/bin/dummy setup --generate-auto-start zsh)"' assertFileExists home-files/.config/fish/config.fish assertFileContains \ home-files/.config/fish/config.fish \ - 'eval (zellij setup --generate-auto-start fish | string collect)' + 'eval (@zellij@/bin/dummy setup --generate-auto-start fish | string collect)' ''; }