fix(fish): persist remote system deployments #138

Merged
alexion merged 1 commits from fix/persist-deployments into main 2026-10-07 18:09:25 -04:00
2 changed files with 10 additions and 2 deletions

View File

@@ -52,8 +52,8 @@
directories already exist inside the read-only source. directories already exist inside the read-only source.
For aggregate Copyparty volumes such as `/srv` with nested `/srv/inbox`, keep the guest bind mount For aggregate Copyparty volumes such as `/srv` with nested `/srv/inbox`, keep the guest bind mount
writable and enforce read-only behavior through Copyparty access plus service `ReadWritePaths`. writable and enforce read-only behavior through Copyparty access plus service `ReadWritePaths`.
- `deploy-to` builds from the source checkout and activates an imported closure on the target. - `deploy-to` builds from the source checkout, records the imported closure as the target system profile,
Do not rely on a target-local monorepo checkout for remote deployment. and activates it. Do not rely on a target-local monorepo checkout for remote deployment.
- On Pikachu, `nix copy --to ssh://pikachu` accepted a small `nix store add-file` probe, - On Pikachu, `nix copy --to ssh://pikachu` accepted a small `nix store add-file` probe,
but rejected locally built system paths that lacked trusted signatures. but rejected locally built system paths that lacked trusted signatures.
Use a sudo `nix-store --import` path for unsigned deploy closures. Use a sudo `nix-store --import` path for unsigned deploy closures.
@@ -64,3 +64,4 @@
- Configure the Chaotic Nyx cache only on hosts that select `linuxPackages_cachyos` (currently Neogaia - Configure the Chaotic Nyx cache only on hosts that select `linuxPackages_cachyos` (currently Neogaia
and Zeus), not in the generic host module. and Zeus), not in the generic host module.
- Module-relative paths resolve from the module file. Update them when moving a module into a subdirectory. - Module-relative paths resolve from the module file. Update them when moving a module into a subdirectory.
- On Pikachu, `uptime` does not support `-s`. Use `who -b` to report the boot time.

View File

@@ -80,6 +80,13 @@ else
echo "deploy-to: $host already has the full closure for $system_path" >&2 echo "deploy-to: $host already has the full closure for $system_path" >&2
end end
echo "deploy-to: recording $system_path as the system profile on $host" >&2
ssh -t $host sudo nix-env --profile /nix/var/nix/profiles/system --set $system_path
or begin
echo "deploy-to: system profile update failed for $host" >&2
return $status
end
echo "deploy-to: activating $system_path on $host" >&2 echo "deploy-to: activating $system_path on $host" >&2
ssh -t $host sudo "$system_path/bin/switch-to-configuration" switch ssh -t $host sudo "$system_path/bin/switch-to-configuration" switch
or begin or begin