-
Notifications
You must be signed in to change notification settings - Fork 0
Prefer sequoia-sq for the option of OpenPGP implementation #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8f9cf5f
Add sequoia-sq for an option of OpenPGP implementation
kachick ac767e3
Fix attr namespace
kachick 11b7406
Remove unfit SEQUOIA_HOME
kachick 6689538
Merge branch 'main' into sq
kachick 799ce06
Replace "gnupg + gpg-agent + pass" with "sequoia-chameleon-gnupg + gp…
kachick 016a8df
Remove temporal code used in early development phase
kachick f9421e4
Remove gnupg, just a missing commit
kachick 9c5c251
Fix gpg-sq path as same as I did in gopass
kachick 20417ce
Remove unused rec now
kachick 5620773
Merge branch 'main' into sq
kachick 95cf173
Merge branch 'main' into sq
kachick f967b06
Update comment
kachick e7dfe0c
Remove gpg-sq alias for gpg, keep original gpg now now
kachick 091e96a
Extract zcompdump path with zsh only variable
kachick ed362ed
Remove ZCOMPDUMP_CACHE in each home-manager activation
kachick d6a5057
Fix to handle cache
kachick b578278
As same as in zsh code
kachick 54dbe3d
Merge branch 'refresh-zcompdump-after-hm' into sq
kachick 8560164
Merge branch 'main' into sq
kachick 84a46fa
Merge branch 'main' into sq
kachick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,6 +123,7 @@ | |
| "la" | ||
| "lat" | ||
| "zed" | ||
| "gpg-alias-with-sq" | ||
| "ghqf" | ||
| "git-delete-merged-branches" | ||
| "git-log-fzf" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,25 @@ | ||
| { config, pkgs, ... }: | ||
| { | ||
| config, | ||
| pkgs, | ||
| edge-pkgs, | ||
| ... | ||
| }: | ||
|
|
||
| # ## FAQ - GPG | ||
| # # FAQ | ||
| # | ||
| # ## sequoia-sq and gpg | ||
| # | ||
| # See GH-830 | ||
| # | ||
| # If you faced to decrypt error with gpg-sq, check it with `sq decrypt`. It displays error details. | ||
| # For example, `1: AEAD Encrypted Data Packet v1 is not considered secure` | ||
| # This is caused by encrypted non configured gpg for the AEAD. Disable it with showpref/setpref if you still use gpg. | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This operation is cannot be done with gpg-sq, because of --edit-key is not yet implemented https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/issues/92 |
||
| # | ||
| # ## sequoia-sq | ||
| # | ||
| # TODO: <UPDATE ME> | ||
| # | ||
| # ## GPG | ||
| # | ||
| # - How to list keys? | ||
| # - 1. `gpg --list-secret-keys --keyid-format=long` # The `sec` first section displays same text as `pub` by `gpg --list-keys --keyid-format=long` | ||
|
|
@@ -23,6 +42,9 @@ let | |
| day = 60 * 60 * 24; | ||
| in | ||
| { | ||
| # Don't set $SEQUOIA_HOME, it unified config and data, cache to one directory as same as gpg era. | ||
| # Use default $HOME instead, it respects XDG Base Directory Specification | ||
|
|
||
| # https://github.com/nix-community/home-manager/blob/release-24.05/modules/services/gpg-agent.nix | ||
| services.gpg-agent = { | ||
| enable = pkgs.stdenv.isLinux; | ||
|
|
@@ -41,16 +63,22 @@ in | |
| enableSshSupport = false; | ||
| }; | ||
|
|
||
| # https://github.com/nix-community/home-manager/blob/release-24.05/modules/programs/gpg.nix | ||
| home.sessionVariables = { | ||
| GOPASS_GPG_BINARY = "${pkgs.lib.getBin edge-pkgs.sequoia-chameleon-gnupg}/bin/gpg-sq"; | ||
| }; | ||
|
|
||
| # https://github.com/nix-community/home-manager/blob/release-24.05/modules/programs/gpg.nix | ||
| programs.gpg = { | ||
| enable = true; | ||
| package = edge-pkgs.sequoia-chameleon-gnupg; # TODO: Consider to set pkgs.emptyDirectory | ||
|
|
||
| # Preferring XDG_DATA_HOME rather than XDG_CONFIG_HOME from following examples | ||
| # - https://wiki.archlinux.org/title/XDG_Base_Directory | ||
| # - https://github.com/nix-community/home-manager/blob/5171f5ef654425e09d9c2100f856d887da595437/modules/programs/gpg.nix#L192 | ||
| homedir = "${config.xdg.dataHome}/gnupg"; | ||
|
|
||
| # Used for `gpg.conf`. I don't know how to specify `gpgconf` with this. | ||
| # TODO: Set gpg binary as sequoia-chameleon-gnupg. AFAIK I don't actually need it for now, because I'm not using dependent tools. However it is ideal config. | ||
| # - How to read `--list-keys` - https://unix.stackexchange.com/questions/613839/help-understanding-gpg-list-keys-output | ||
| # - Ed448 in GitHub is not yet supported - https://github.com/orgs/community/discussions/45937 | ||
| settings = { | ||
|
|
@@ -64,5 +92,6 @@ in | |
| # https://github.com/nix-community/home-manager/blob/release-24.05/modules/programs/password-store.nix | ||
| programs.password-store = { | ||
| enable = true; | ||
| package = pkgs.gopass; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { pkgs, edge-pkgs, ... }: | ||
| pkgs.writeShellApplication rec { | ||
| name = "gpg"; # This will be the alias. | ||
| text = builtins.readFile ./${name}.bash; | ||
| runtimeInputs = [ edge-pkgs.sequoia-chameleon-gnupg ]; | ||
| meta.description = "See GH-830"; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| gpg-sq "$@" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For context of replacing gpg, I need https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg.
Latest stable is NixOS/nixpkgs#349002, but I don't need to wait the binary cache. I guess I can implement settings with older version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated commit has been merged in 95cf173