pinwheel: Ensure opencode has access to interactive bash
This commit is contained in:
@@ -12,6 +12,18 @@ let
|
||||
in
|
||||
{
|
||||
home-manager.users.alex = {
|
||||
# Ensure bashInteractive is first in PATH inside nix devshells.
|
||||
# stdenv provides a non-interactive bash that breaks Copilot shell commands.
|
||||
# Adding bashInteractive to home.packages alone isn't enough because devshell
|
||||
# packages are prepended to PATH. This precmd hook runs after direnv's hook
|
||||
# and re-prepends bashInteractive so it takes priority.
|
||||
programs.zsh.initContent = ''
|
||||
_ensure_bash_interactive() {
|
||||
[[ "$PATH" == "${pkgs.bashInteractive}/bin:"* ]] || export PATH="${pkgs.bashInteractive}/bin:$PATH"
|
||||
}
|
||||
precmd_functions+=(_ensure_bash_interactive)
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
GITHUB_ACTOR = "Alexander Heldt";
|
||||
GITHUB_TOKEN = "$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-github-token.path})";
|
||||
@@ -25,6 +37,7 @@ in
|
||||
"IdeaVIM"
|
||||
"com.github.copilot"
|
||||
])
|
||||
pkgs.bashInteractive
|
||||
|
||||
(pkgs.google-cloud-sdk.withExtraComponents [
|
||||
pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin
|
||||
|
||||
Reference in New Issue
Block a user