Move mobile device SSH keys into a separate external systems list #45
Labels
No labels
automerge
bug
dependencies
duplicate
help wanted
invalid
lang
rust
migrations
opencode
question
security
type
documentation
type
enhancement
type
maintenance
type
refactor
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Personal/nixos-configuration#45
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The mobile devices
localhost-y4maoyqmandlocalhost-4izgka9klive insystems.nixalongside buildable hosts. They are SSH clients, not NixOS hosts, but every consumer ofsystemstreats them as one. Keep the devices and their SSH access, and move their public keys into a separate list of external systems that is consumed only where device access is needed.Context
systems.nixdefines both devices withkind = "mobile"; the Pixel entry carries a# TODO update keynote. The same attrset drives four unrelated concerns:flake.nixbuildsnixosConfigurationsfrom every entry, producinglocalhost-y4maoyqmandlocalhost-4izgka9kconfigurations whosehosts/localhost-*directories do not exist. Any evaluation that forces them fails.shared/base/modules/security/ssh.nixadds the device keys toprograms.ssh.knownHosts, as if they were host keys for hostnames that are not real hosts.shared/base/modules/security/ssh.nixadds the device keys toopenssh.authorizedKeys.keys; this is the SSH access the devices depend on.shared/base/home-manager/development/git.nixadds the device keys to gitallowed_signers, so a device key can produce a commit that verifies asgit@martials.no.Nothing filters on
kind == "mobile"; the onlykindconsumer is the Zed server list, which filters forkind == "server". Deleting the entries outright would drop device SSH access, which is why the keys move instead.Scope
external-systems.nixnext tosystems.nix, keyed by device name and holding each device's public SSH key.systems, and sourceopenssh.authorizedKeys.keysfrom host keys plus external system keys.systems.nixsonixosConfigurationsandknownHostscontain only real hosts, and drop the now-unusedmobilekind.# TODO update keynote with the key and confirm whether it is current.allowed_signers(current behaviour) or whether only host keys may sign commits.Out of scope
Acceptance criteria
systems.openssh.authorizedKeys.keys.systemscontains only buildable hosts, andnixosConfigurationsno longer includeslocalhost-*entries.programs.ssh.knownHostscontains host keys only.just fmtand a build of each host succeed without activation.Dependencies
These are used for ssh, and a removal would case them to not be able to sign in
Remove mobile devices from systems definitionsto Move mobile device SSH keys into a separate external systems listDecisions
systems.nixinto a separate external systems list instead of being deleted.nixosConfigurationsorprograms.ssh.knownHosts.Open questions
# TODO update key; confirm the key is current before moving it, since a stale key grants SSH access to whoever holds it.allowed_signersand can sign asgit@martials.no. Keep that behaviour or restrict signers to host keys?Scope and acceptance criteria updated accordingly.