Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions home/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,6 @@ let
# wrapper below execs it, and the wrapped package joins over it.
opencodeCascade = inputs.openchamber.inputs.opencode.packages.${system}.opencode;

# The build the watchdog's build-identity check (code#8255) expects
# on the port — read from the name of the very package derivation
# the unit runs (opencodeCascade), so expectation and ExecStart
# resolve from one derivation and cannot drift apart.
watchdogExpectedVersion =
let
m = builtins.match "opencode-(.*)" inputs.openchamber.inputs.opencode.packages.${system}.opencode.name;
in
if m == null then "" else builtins.head m;
# Drew's opencode wrapper -- formerly a standalone home.packages
# entry (writeShellScriptBin "opencode"), logic unchanged:
# Cloudflare env top-up and the stamp-gated sync-models
Expand Down Expand Up @@ -1114,7 +1105,6 @@ in
};


services.opencode-watchdog.expectedVersion = watchdogExpectedVersion;

services.opencode = {
# enable comes from the cascade (mkDefault at each layer).
Expand Down
19 changes: 18 additions & 1 deletion nixos/hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,24 @@ in
# so after a 120s dark grace window the watchdog alerts and
# restarts the unit (Restart=always would race lifecycle
# handovers — see the module).
services.opencode-watchdog.enable = true;
services.opencode-watchdog = {
enable = true;
# The build the watchdog's build-identity check (code#8255)
# expects on the port, read from the name of the very
# opencode package derivation the unit runs (openchamber's
# nested opencode input — the same derivation home/common's
# cascade wraps), so expectation and ExecStart resolve from
# one derivation and cannot drift apart. This option lives
# at the NixOS level (this module is a NixOS import); the
# home-manager copy of this setting that #8255 landed in
# home/common/default.nix named an option that does not
# exist there and broke evaluation of the whole config.
expectedVersion =
let
m = builtins.match "opencode-(.*)" inputs.openchamber.inputs.opencode.packages.x86_64-linux.opencode.name;
in
if m == null then "" else builtins.head m;
};
}
{
# Laptop backups (code#1516, dezren39/nix#976): the dashboard
Expand Down
Loading