mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 19:49:18 +00:00
The integration snippets keyed off GHOSTTY_RESOURCES_DIR being set and sourced the script unconditionally. Applications embedding GhosttyKit, such as cmux, export GHOSTTY_RESOURCES_DIR pointing at a resource tree that ships terminfo and themes but no shell-integration directory, so every interactive shell started inside them failed with: no such file or directory: /Applications/cmux.app/Contents/Resources/ghostty/shell-integration/zsh/ghostty-integration Test for the integration file itself instead of the variable.
33 lines
977 B
Nix
33 lines
977 B
Nix
{ config, ... }:
|
|
{
|
|
programs.bash.enable = true;
|
|
programs.fish.enable = true;
|
|
programs.zsh.enable = true;
|
|
|
|
programs.ghostty = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage { outPath = null; };
|
|
|
|
settings = {
|
|
theme = "catppuccin-mocha";
|
|
font-size = 10;
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
servicePath=home-files/.config/systemd/user/app-com.mitchellh.ghostty.service
|
|
assertPathNotExists $servicePath
|
|
|
|
assertFileContent \
|
|
home-files/.config/ghostty/config \
|
|
${./example-config-expected}
|
|
|
|
assertFileContains home-files/.bashrc \
|
|
'"''${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash" ]]; then'
|
|
assertFileContains home-files/.config/fish/config.fish \
|
|
'test -r "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish"'
|
|
assertFileContains home-files/.zshrc \
|
|
'"$GHOSTTY_RESOURCES_DIR"/shell-integration/zsh/ghostty-integration ]]; then'
|
|
'';
|
|
}
|