Skip to content

Unlock encrypted identities through systemd password agents - #448

Open
ryantm wants to merge 1 commit into
test/issue376-native-initfrom
feature/issue340-unlock-identity
Open

ryantm wants to merge 1 commit into
test/issue376-native-initfrom
feature/issue340-unlock-identity

Conversation

@ryantm

@ryantm ryantm commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Adds the optional nixosModules.identityUnlock module so encrypted identities can be unlocked through systemd password agents at boot or during a rebuild with no attached terminal. SSH identities use OpenSSH askpass; passphrase-encrypted native age identities use a pipe into age's batchpass plugin. The unlocked key stays on root-only ramfs and is removed on service stop or failure.

The default uses systemd secret installation. Early Userborn/sysusers password secrets require the native age format, because OpenSSH needs a user record before unlocking an SSH key. Documentation covers console/remote password agents, timeouts, retries, source-key updates, and the stage-2 scope.

Validation: three NixOS VMs exercise SSH/native identities, first-boot Userborn password hashes, a real systemd-run --pipe restart, wrong passwords, cancellation, timeout, successful retry, permissions, ramfs cleanup, and absence of the passphrase from process arguments/environment and service logs. All-system test evaluation, formatting, generated shell checks, and the documentation build pass.

Stacked on #445, which in turn tests the systemd activation work in #367.

Closes #340.
Closes #371.

AI assistance: implementation, documentation, and tests prepared with Codex. Human review is still required; no claim is made that passing tests substitutes for review.

This branch has not been deployed

No deployments
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