Decouple OCI container restart triggers from Git configurationRevision #271

Closed
opened 2026-10-06 20:07:55 +01:00 by nimmo · 0 comments
Owner

Context & Problem

All container modules under modules/containers/ (killarr.nix, paseo-relay.nix, paseo-webui.nix, plexdrome.nix, rangarr.nix, slskd.nix, synthseek.nix) configure:

systemd.services.docker-<name>.restartTriggers = [
  (pkgs.writeText "<name>-configuration-revision" configurationRevision)
];

Because configurationRevision reflects the Git commit SHA (or dirty tree), any rebuild after any commit—even an edit to a README, an unrelated host config, or a helper script—forces systemd to restart all containers on switch. This breaks NixOS's zero-unnecessary-downtime property and causes frequent service churn on Chaos.

Scope

  • modules/containers/killarr.nix
  • modules/containers/paseo-relay.nix
  • modules/containers/paseo-webui.nix
  • modules/containers/plexdrome.nix
  • modules/containers/rangarr.nix
  • modules/containers/slskd.nix
  • modules/containers/synthseek.nix

Implementation Checklist

  • Remove pkgs.writeText "<name>-configuration-revision" configurationRevision from restartTriggers across all container declarations.
  • For containers with mutable config paths (e.g. rangarr, killarr), replace the trigger with a hash of the file if needed, or rely on standard systemd unit definition changes.
  • Verify that rebuilding Chaos after an unrelated commit leaves running Docker containers uninterrupted.

Completion Criteria

  • Flake check passes on all hosts.
  • Rebuilding chaos after an unrelated commit does not issue systemctl restart docker-<name> commands.
## Context & Problem All container modules under `modules/containers/` (`killarr.nix`, `paseo-relay.nix`, `paseo-webui.nix`, `plexdrome.nix`, `rangarr.nix`, `slskd.nix`, `synthseek.nix`) configure: ```nix systemd.services.docker-<name>.restartTriggers = [ (pkgs.writeText "<name>-configuration-revision" configurationRevision) ]; ``` Because `configurationRevision` reflects the Git commit SHA (or dirty tree), any rebuild after any commit—even an edit to a README, an unrelated host config, or a helper script—forces systemd to restart all containers on switch. This breaks NixOS's zero-unnecessary-downtime property and causes frequent service churn on Chaos. ## Scope - `modules/containers/killarr.nix` - `modules/containers/paseo-relay.nix` - `modules/containers/paseo-webui.nix` - `modules/containers/plexdrome.nix` - `modules/containers/rangarr.nix` - `modules/containers/slskd.nix` - `modules/containers/synthseek.nix` ## Implementation Checklist - [ ] Remove `pkgs.writeText "<name>-configuration-revision" configurationRevision` from `restartTriggers` across all container declarations. - [ ] For containers with mutable config paths (e.g. `rangarr`, `killarr`), replace the trigger with a hash of the file if needed, or rely on standard systemd unit definition changes. - [ ] Verify that rebuilding Chaos after an unrelated commit leaves running Docker containers uninterrupted. ## Completion Criteria - Flake check passes on all hosts. - Rebuilding `chaos` after an unrelated commit does not issue `systemctl restart docker-<name>` commands.
nimmo closed this issue 2026-10-07 06:16:04 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#271
No description provided.