Unlock the keychain on login

For lack of rhymes, was prescribed,
one green witch: here I’ve arrived!

A stunning tool did I find Nix,
yet a single problem I could not fix!

Auto login worked just fine,
that is, aside from trying to talk online.

For opening Discord produced a login screen,
a password prompt is swiftly seen.

So here’s my issue, that SSDM should surely know,
that if I have just logged in, my keychain’s passwords should be ready to go.

So then dear Nix Discourse, I must ask,
what configuration do I need to complete this task?

Hello
Nice poem. If I understood correctly you want to unlock keyring when you login with sddm.
To do this you need to put following in your config:

security.pam.services.sddm.enableGnomeKeyring = true;
1 Like

Postboote, your kindness is fully noted,
with how quickly your reply was posted!

I will try this once at home,
but why is this related to Gnome?

1 Like

If Keychain is the one you seek,
A little tweak will do the trick.
Just place this line where it belongs,
And hear the login sing its song.

It all depends on what you run—
Your shell decides how this is done.
For Bash, use .bashrc right,
For Zsh, let .zshrc shine bright.

Add this line, so clean and neat,
To make your login smooth and sweet:

security -v unlock-keychain -p <password> <keychain_path>  

With every login, smooth and fast,
Your keychain opens—free at last!
No extra steps, no locks remain,
A simple way to ease your pain.

1 Like

My appreciation knows no limit,
a reply in verse, clear instructions within it!

And yet I am still nervous to apply as given,
for a password in SSDM’s config: isn’t that forbidden?

After all this is storing in plaintext,
the results of which? A security most hex’t!

One modification I would like to seek:
to use hashes, so my secrets can’t be peeped.

If possible, could you link me documentation,
so that I can familiarise with this interesting situation?

1 Like

No docs to read, no guide in sight,
No simple steps to set it right.
Keychain hides its secrets deep,
Its methods locked, its knowledge steep.

No login manager holds the key,
No built-in way to set it free.
No hash commands to break its chain,
Just endless searches made in vain.

Keychain on GitHub is what you seek?
to take you to the mountain peak?

1 Like

I have grown concerned with the size of your head,
for genius is implied by what you have said!

Thank you for clarifying it’s Keychain I need,
not SSDM, as I before believed.

I shall review your link and share what I find after,
hopefully it will be simple, and we can celebrate with laughter.

As a side note, now I have a plan I think is best,
where should I post, to suggest documentation of this quest?

1 Like

First, post your fix for all to see,
And mark it as the remedy.
Let others know the way is clear,
So they can solve it without fear.

But if you’d like to help some more,
A guide is what they’re looking for.
Just start a thread, make things bright,
And share your knowledge, set it right.

Find the place to lend a hand,
In Nixos Guides, where answers stand:

:link: NixOS Guides

1 Like