Repository navigation
fix: add PAM integration for GPG passphrase persistence across reboots #874
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
Changes from 4 commits
649abd9
51cacfa
c7cdc29
d2cec42
5fec16d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -62,14 +62,21 @@ inputs.nixpkgs.lib.nixosSystem { | |||||||||||||
| "networkmanager" | ||||||||||||||
| "input" | ||||||||||||||
| "video" | ||||||||||||||
| "docker" | ||||||||||||||
| ]; | ||||||||||||||
| home = "/home/${username}"; | ||||||||||||||
| shell = pkgs.fish; | ||||||||||||||
| initialPassword = "changemeow"; # Change this after first login with: passwd | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| # Docker | ||||||||||||||
| virtualisation.docker.enable = true; | ||||||||||||||
|
|
||||||||||||||
| security.sudo.wheelNeedsPassword = false; | ||||||||||||||
|
|
||||||||||||||
| # PAM integration for GNOME Keyring auto-unlock on login | ||||||||||||||
|
||||||||||||||
| # PAM integration for GNOME Keyring auto-unlock on login | |
| # PAM integration for GNOME Keyring auto-unlock on login. | |
| # Note: PAM can only unlock the login keyring when a secret is available | |
| # from the authentication flow (typically a password-based login). With | |
| # passwordless or auto-login greetd setups, no such secret may be provided, | |
| # so auto-unlock of the GNOME Keyring might not work as expected. |
Copilot
AI
Feb 20, 2026
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.
If this services.gpg-agent block is from Home Manager, the pinentry option is commonly services.gpg-agent.pinentryPackage, not a nested pinentry.package. Since this line is being edited, it’s a good point to align with the module’s expected option name to avoid an unknown-option evaluation failure.
| pinentry.package = pkgs.pinentry-gnome3; | |
| pinentryPackage = pkgs.pinentry-gnome3; |
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.
Since you're enabling the GNOME Keyring for GPG, you could also leverage it for SSH agent functionality. By adding the ssh component, your SSH key passphrases can also be stored in the keyring and unlocked automatically on login. This would provide a consistent experience for both GPG and SSH, and is a common practice when using gnome-keyring.
components = [ "secrets" "ssh" ];
Copilot
AI
Feb 20, 2026
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.
services.gnome-keyring is typically a Home Manager option; on NixOS the GNOME Keyring module is usually namespaced under services.gnome.gnome-keyring. As written, this is likely to fail Nix evaluation with an “option does not exist” error; switch to the NixOS option path (or move this block into the Home Manager user config if that’s the intended scope).
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.
P2: pinentry-tty only prompts on a controlling TTY, so GUI apps in this Hyprland session won’t be able to unlock keys and GPG prompts will fail. Use a GUI pinentry (e.g., pinentry-gnome3) for a graphical login.
Prompt for AI agents