Skip to content

Conversation

@jaredmontoya
Copy link
Contributor

Description

Replaces the usage of home.sessionVariablesExtra with individual shell integrations for each shell.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

@github-actions github-actions bot added the system label Nov 1, 2025
@jaredmontoya jaredmontoya force-pushed the ssh-agent-shell-integrations branch 2 times, most recently from 436ced6 to 993e3b9 Compare November 1, 2025 18:12
@bmrips
Copy link
Contributor

bmrips commented Nov 1, 2025

What is the problem that you want to solve with this PR? That's not clear to me yet.

@jaredmontoya
Copy link
Contributor Author

home.sessionVariablesExtra only supports bash compatible login shells.
For proper support of all other shells in home-manager home.sessionVariablesExtra has to go.
Currently it is only used in ssh-agent, gpg-agent, and 2 times internally.
I plan to also remove it from gpg-agent next.

replaces `home.sessionVariablesExtra`
@jaredmontoya jaredmontoya force-pushed the ssh-agent-shell-integrations branch from 993e3b9 to babfdc4 Compare November 1, 2025 18:27
@khaneliman khaneliman merged commit c0016dd into nix-community:master Nov 1, 2025
7 checks passed
@jaredmontoya jaredmontoya deleted the ssh-agent-shell-integrations branch November 2, 2025 09:32
bmrips added a commit to bmrips/home-manager that referenced this pull request Nov 19, 2025
Since PR nix-community#8099, the module sets `$SSH_AUTH_SOCK` through shells' options
for interactive shell initialization instead of
`home.sessionVariablesExtra`. The replacement was not faithful, however,
since `home.sessionVariablesExtra` is sourced also in non-interactive
shells. With this commit, the shells' profile options (where
`home.sessionVariablesExtra` is sourced) are used to set
`$SSH_AUTH_SOCK`.

Fixes nix-community#8129.
bmrips added a commit to bmrips/home-manager that referenced this pull request Nov 24, 2025
Since PR nix-community#8099, the module sets `$SSH_AUTH_SOCK` through shells' options
for interactive shell initialization instead of
`home.sessionVariablesExtra`. The replacement was not faithful, however,
since `home.sessionVariablesExtra` is sourced also in non-interactive
shells. With this commit, the shells' profile options (where
`home.sessionVariablesExtra` is sourced) are used to set
`$SSH_AUTH_SOCK`.

Fixes nix-community#8129.
bmrips added a commit to bmrips/home-manager that referenced this pull request Dec 1, 2025
Since PR nix-community#8099, the module sets `$SSH_AUTH_SOCK` through shells' options
for interactive shell initialization instead of
`home.sessionVariablesExtra`. The replacement was not faithful, however,
since `home.sessionVariablesExtra` is sourced also in non-interactive
shells. With this commit, the shells' profile options (where
`home.sessionVariablesExtra` is sourced) are used to set
`$SSH_AUTH_SOCK`.

Fixes nix-community#8129.
bmrips added a commit to bmrips/home-manager that referenced this pull request Dec 1, 2025
Since PR nix-community#8099, the module sets `$SSH_AUTH_SOCK` through shells' options
for interactive shell initialization instead of
`home.sessionVariablesExtra`. The replacement was not faithful, however,
since `home.sessionVariablesExtra` is sourced also in non-interactive
shells. With this commit, the shells' profile options (where
`home.sessionVariablesExtra` is sourced) are used to set
`$SSH_AUTH_SOCK`.

Fixes nix-community#8129.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants