Update page: move the machine's sources and see which apps they carry #20
Loading…
Reference in a new issue
No description provided.
Delete branch "update-sources"
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?
The update page lists the machine's flake inputs and lets you move them from the drawer. Before this, it pointed at
./deployand listednix profile.What's on the page
programs.fjordxy.settings.repo'sflake.lock. Each row shows where the input comes from, whether its upstream has moved (git ls-remoteagainst the locked ref; tarballs say "can't tell"), how old the lock is, and which declared apps it moves. The apps are matched bymeta.positionagainst each input's store paths, so on black, telegram, terminal and browser show under nixpkgs.fjordxy-update@<input>. It re-locks just that input, commitsflake.lockaslock: llm-agents 499fb79→baf9243, then runsfjordxy-rebuild. If the build fails, the lock commit is taken back off, and only if nothing has landed on top of it../deploydoes).nix profile, which keeps its own upgrade-all.fjordxy-activate@unit.How
fjordxy-sources status | update <input|all> | rollbackinnix/package.nix.fjordxy-update@user unit innix/rebuild.nix. It gets the rebuild's environment, because the shell has the repo path but not the hostname.fjordxy-rebuildandfjordxy-sourcesboth use. An update with someone else's edit in the tree stops before re-locking anything, and the page names the file.$XDG_RUNTIME_DIR/fjordxy-update.json, andSources.qmlwatches that file instead of polling.position. The drawer IPC gainsupdates().Tested
--override-input fjordxyon this branch. The unit has the right environment, and the apps file carries positions.fjordxy-sources statusagainst black: correct sources and generations (about 4.5 s, mostly ls-remote).Known gap:
dev/fjordxy-dev upfails onmainwith an infinite recursion innix/dev-config.nix. That's unrelated to this PR, and I worked around it for testing.🤖 Generated with Claude Code
Added: every installed package now shows under its source, not only declared apps. On black, llm-agents lists claude-code · pi · codex, rexy lists rexy-desk · ghostty, nixpkgs shows browser · telegram · terminal · +143 packages, and fleet · forge show as built in this repo. Packages are placed by
fjordxy-sources statusfrom the newFJORDXY_PACKAGESfile the home-manager module writes. Packages the repo builds itself are matched by path, so they stay placed after later commits. Black's toplevel builds with it, and I checked it rendered in a nested session.🤖 Generated with Claude Code
884b7bbdd8to5b86ec222f"Switch back" went through fjordxy-activate@, whose `nix-env --set` always makes a new generation. Going back from a broken 37 made 38, a copy of 36, and "the one before this" was then 37 again: a second press went forward to the broken system, and nothing older than the last two could be reached. - New root template fjordxy-generation@<n> (fjordxy-switch-generation): `nix-env --switch-generation n`, then that generation's switch-to-configuration. The instance must be a generation number with an existing system-<n>-link into the store that has switch-to-configuration. The polkit rule allows it for digits only. It can reach strictly less than fjordxy-activate@ already can. - fjordxy-rebuild and fjordxy-sources record every switch fjordxy makes as {from, to, commit} in $XDG_STATE_HOME/fjordxy/generations.json. "Previous" is the `from` of the entry that made the current generation, and falls back to the highest number below it. Back on 36 after a broken 37, the next rebuild's 38 then offers 36, not 37. - The rollback walks that history one step per press. Each step over an update commits flake.lock back to the lock commit's parent. If the switch fails after the profile moved, the lock still follows it. - fjordxy-rebuild's notification no longer says "the generation is unchanged" when the profile was set and only the switch failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>