Skip to content

fix(amd): unlock GNOME Keyring at SDDM login - keyring rules for the sddm PAM stack - #5480

Merged
dezren39 merged 1 commit into
mainfrom
fix/5477-sddm-gnome-keyring
Nov 4, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/5477-sddm-gnome-keyring

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Refs #5477 (durable fix; the issue stays open until the post-switch proof lands).

Change

One inline module added to the amd host's module list in nixos/hosts/default.nix. It sets security.pam.services.sddm.enableGnomeKeyring = true; and adds the gnome_keyring rules to the sddm service's auth, password and session rule sets, mirroring the login service's own keyring rules (module path and order are referenced from config.security.pam.services.login.rules, not copied, so they track nixpkgs).

Why the rules, not just the flag

The flag alone is a no-op in this tree — verified at eval, not assumed: with only enableGnomeKeyring = true, the generated pam.d/sddm is byte-identical to baseline. Reason: sddm's PAM rule set here is a custom delegation set (each phase has a single login rule, order 10100, include/substack), which replaces the default rule generation the flag feeds. The flag stays in the change as the statement of intent (and takes effect if the rule set ever reverts to defaults); the explicit rules are what change the generated file today.

Generated pam.d/sddm after this change (was: delegation lines only):

auth substack login
auth optional .../pam_gnome_keyring.so
password substack login
password optional .../pam_gnome_keyring.so use_authtok
session include login
session optional .../pam_gnome_keyring.so auto_start

Why here

SDDM itself is enabled in the shared desktop module (nixos/services/default.nix), but the missing keyring unlock is amd's login-path problem (see #5477 for the measured evidence chain), so the fix is scoped to amd via its host module list — the tree's existing home for amd-only settings — rather than changing the shared module for every desktop host. Eval confirms the nixos host is untouched (its sddm flag stays false, no keyring rules).

Verification

  • Targeted evals on the laptop against the real config: amd flag true; sddm rules gain the three gnome_keyring rules; generated pam.d/sddm gains the three pam_gnome_keyring lines above, each after the login delegation line; baseline-vs-change text diff goes from byte-identical (flag-only) to exactly those lines (with rules).
  • No switch run: this rides the next switch alongside the libvirt LoadCredential change. laptop(amd): SDDM login never unlocks GNOME Keyring - enable pam_gnome_keyring so the keyring-held gh token survives reboots #5477 closes only after the post-switch proof (reboot + graphical login, login collection Locked=false with no manual unlock, plain-SSH gh auth status ~0.5s with full scopes).

@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 13:49
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 62384b3e-7b6d-4c44-92b5-84c8437fface
Commits

Reviewing files that changed from the base of the PR and between eb3e71c and dfb7757.

Files selected for processing: 1
  • nixos/hosts/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T14:10:14.767321Z dfb7757 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…sddm PAM stack (#5477)

The graphical login never handed the password to GNOME Keyring, so the login collection stayed locked and non-desktop contexts (SSH, agents) stalled indefinitely reading keyring-held secrets (the gh token). The bare enableGnomeKeyring flag is a no-op in this tree - sddm's PAM rule set is a custom delegation set (every phase includes/substacks login) into which the flag injects nothing; verified at eval, the generated pam.d/sddm was byte-identical with the flag on or off. So the module also adds the keyring rules to sddm's own stack explicitly (auth/password/session, mirroring the login service's rules; module path and order referenced from the login service so they track nixpkgs). Generated pam.d/sddm now carries pam_gnome_keyring in all three phases, after the login substack. Scoped to the amd host module list; rides the next switch. Post-switch verification per #5477.
@dezren39
dezren39 force-pushed the fix/5477-sddm-gnome-keyring branch from 1880e90 to dfb7757 Compare November 4, 2026 14:08
@dezren39 dezren39 changed the title fix(amd): enable pam_gnome_keyring for SDDM so the keyring unlocks at login fix(amd): unlock GNOME Keyring at SDDM login - keyring rules for the sddm PAM stack Nov 4, 2026
@dezren39
dezren39 merged commit eaa7fdb into main Nov 4, 2026
1 of 2 checks passed
@dezren39
dezren39 deleted the fix/5477-sddm-gnome-keyring branch November 4, 2026 14:08
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.

1 participant