diff --git a/home/common/default.nix b/home/common/default.nix index e17043d7d1..7f0c828e83 100644 --- a/home/common/default.nix +++ b/home/common/default.nix @@ -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 @@ -1114,7 +1105,6 @@ in }; - services.opencode-watchdog.expectedVersion = watchdogExpectedVersion; services.opencode = { # enable comes from the cascade (mkDefault at each layer). diff --git a/nixos/hosts/default.nix b/nixos/hosts/default.nix index 85c49e5ccd..59ac242f6b 100644 --- a/nixos/hosts/default.nix +++ b/nixos/hosts/default.nix @@ -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