pi: merge declared settings into a persisted settings.json #1498

Merged
JakeHillion merged 1 commits from jj/qqkoruyukukv into main 2026-12-06 01:17:35 +00:00
Owner

Pi saves fields of its own into ~/.pi/agent/settings.json, such as the
deviceId it sends OpenAI when signing in with ChatGPT and defaults saved
from the model picker. The file was a home-manager link into the Nix
store, so every save failed silently and Pi made a new deviceId for every
login. ogygia-nix-fixer copied its settings in only when the file was
missing, so changes to them never reached an existing install.

Added pi-merge-settings, which replaces each top-level field the Nix
config declares, keeps every other field, and logs the path of each value
the replacement drops without the value. The home module persists
settings.json and runs it on every home-manager activation, so the log
lands in the journal under home-manager-jake. The fixer runs it in
preStart in place of its one-time copy. An AGENTS.md tells Pi where its
configuration comes from, so it proposes changes to this repository
rather than editing files a deploy overwrites.

Test plan:

  • CI
  • Built maverick's and iceman's toplevels
  • Ran pi-merge-settings on a missing file, an unchanged file, a file with
    changed declared fields plus a deviceId, and a declared object replaced
    by a string: it logged only the changed paths and kept deviceId
Pi saves fields of its own into ~/.pi/agent/settings.json, such as the deviceId it sends OpenAI when signing in with ChatGPT and defaults saved from the model picker. The file was a home-manager link into the Nix store, so every save failed silently and Pi made a new deviceId for every login. ogygia-nix-fixer copied its settings in only when the file was missing, so changes to them never reached an existing install. Added pi-merge-settings, which replaces each top-level field the Nix config declares, keeps every other field, and logs the path of each value the replacement drops without the value. The home module persists settings.json and runs it on every home-manager activation, so the log lands in the journal under home-manager-jake. The fixer runs it in preStart in place of its one-time copy. An AGENTS.md tells Pi where its configuration comes from, so it proposes changes to this repository rather than editing files a deploy overwrites. Test plan: - CI - Built maverick's and iceman's toplevels - Ran pi-merge-settings on a missing file, an unchanged file, a file with changed declared fields plus a deviceId, and a declared object replaced by a string: it logged only the changed paths and kept deviceId
JakeHillion force-pushed jj/qqkoruyukukv from d389435651 to ded10c87eb 2026-12-05 19:05:36 +00:00 Compare
JakeHillion force-pushed jj/qqkoruyukukv from ded10c87eb to f23366b292 2026-12-05 20:16:02 +00:00 Compare
JakeHillion force-pushed jj/qqkoruyukukv from f23366b292 to 6630f251d2 2026-12-05 20:20:03 +00:00 Compare
JakeHillion force-pushed jj/qqkoruyukukv from 6630f251d2 to bfd971b0cd 2026-12-05 20:22:12 +00:00 Compare
JakeHillion force-pushed jj/qqkoruyukukv from bfd971b0cd to fafe17e86e 2026-12-05 21:32:58 +00:00 Compare
JakeHillion force-pushed jj/qqkoruyukukv from fafe17e86e to 1e85771fe1 2026-12-05 22:04:19 +00:00 Compare
JakeHillion force-pushed jj/qqkoruyukukv from 1e85771fe1 to 8ab0298995 2026-12-06 01:04:19 +00:00 Compare
JakeHillion added 1 commit 2026-12-06 01:09:35 +00:00
pi: merge declared settings into a persisted settings.json
commit-validation / validate-single-commit (pull_request) Successful in 3s
buildbot/nix-eval Build done. (30 warnings)
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
635b992acd
Pi saves fields of its own into ~/.pi/agent/settings.json, such as the
deviceId it sends OpenAI when signing in with ChatGPT and defaults saved
from the model picker. The file was a home-manager link into the Nix
store, so every save failed silently and Pi made a new deviceId for every
login. ogygia-nix-fixer copied its settings in only when the file was
missing, so changes to them never reached an existing install.

Added pi-merge-settings, which replaces each top-level field the Nix
config declares, keeps every other field, and logs the path of each value
the replacement drops without the value. The home module persists
settings.json and runs it on every home-manager activation, so the log
lands in the journal under home-manager-jake. The fixer runs it in
preStart in place of its one-time copy. An AGENTS.md tells Pi where its
configuration comes from, so it proposes changes to this repository
rather than editing files a deploy overwrites.

Test plan:
- CI
- Built maverick's and iceman's toplevels
- Ran pi-merge-settings on a missing file, an unchanged file, a file with
  changed declared fields plus a deviceId, and a declared object replaced
  by a string: it logged only the changed paths and kept deviceId
JakeHillion force-pushed jj/qqkoruyukukv from 8ab0298995 to 635b992acd 2026-12-06 01:09:35 +00:00 Compare
JakeHillion merged commit 635b992acd into main 2026-12-06 01:17:35 +00:00
JakeHillion deleted branch jj/qqkoruyukukv 2026-12-06 01:17:36 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JakeHillion/nixos#1498