Skip to content

gpg-agent: make shell integrations optional#2927

Merged
sumnerevans merged 2 commits intonix-community:masterfrom
crazymanjinn:master
May 1, 2022
Merged

gpg-agent: make shell integrations optional#2927
sumnerevans merged 2 commits intonix-community:masterfrom
crazymanjinn:master

Conversation

@crazymanjinn
Copy link
Copy Markdown
Contributor

Description

In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

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

Appears an unrelated test case is failing even before my change:

❯ nix-shell --pure tests -A run.all
error: attribute 'shellDryRun' missing

       at /home/user/projects/home-manager/modules/programs/bash.nix:12:9:

           11|     checkPhase = ''
           12|       ${pkgs.stdenv.shellDryRun} "$target"
             |         ^
           13|     '';
(use '--show-trace' to show detailed location information)

However, all the gpg-agent related tests do pass:

❯ for t in gpg-agent-default-homedir gpg-agent-override-homedir; do nix-shell --pure tests -A run.$t; done
❯ for t in gpg-agent-default-homedir gpg-agent-override-homedir; do nix-shell --pure tests -A run.$t; done
gpg-agent-default-homedir: OK
gpg-agent-override-homedir: OK
  • Test cases updated/added. See example.

Change seems trivial enough it shouldn't need new testcases? Happy to be wrong, so please let me know if you would like me to add some.

  • 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

This PR does not.

In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.
@crazymanjinn crazymanjinn requested a review from rycee as a code owner April 30, 2022 15:47
Comment thread modules/services/gpg-agent.nix Outdated
@sumnerevans sumnerevans merged commit df60105 into nix-community:master May 1, 2022
@sumnerevans sumnerevans changed the title gpg-agent: shell integration is configurable gpg-agent: make shell integrations optional May 1, 2022
crazymanjinn added a commit to crazymanjinn/home-manager that referenced this pull request May 1, 2022
In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.

(cherry picked from commit df60105)
berbiche pushed a commit that referenced this pull request May 2, 2022
In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.

(cherry picked from commit df60105)
@teto teto mentioned this pull request Aug 22, 2022
7 tasks
teto pushed a commit to teto/home-manager that referenced this pull request Aug 22, 2022
In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.
spacekookie pushed a commit to spacekookie/home-manager that referenced this pull request Feb 10, 2023
In esoteric setups, automatically setting GPG_TTY to current tty is not
desired on every shell startup. This change adds configuration options
to allow user to disable that if desired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants