Skip to content

fix: use NixOS incus.agent module for reliable agent restart#13

Merged
ethannortharc merged 1 commit intomainfrom
fix/incus-agent-nixos-module
Mar 11, 2026
Merged

fix: use NixOS incus.agent module for reliable agent restart#13
ethannortharc merged 1 commit intomainfrom
fix/incus-agent-nixos-module

Conversation

@ethannortharc
Copy link
Copy Markdown
Owner

Summary

  • Replace manual incus-agent systemd service with virtualisation.incus.agent.enable = true
  • The NixOS module sets restartIfChanged = false and stopIfChanged = false, preventing nixos-rebuild from killing the agent mid-switch
  • Also includes proper udev rules and 9p mount setup that our manual service was missing
  • Root cause: nixos-rebuild stops all changed services during activation — without the skip flags, the agent dies and never comes back

Test plan

  • devbox create --name test --tools go on Incus/Linux — agent stays alive through nixos-rebuild
  • All post-rebuild provisioning steps complete successfully

🤖 Generated with Claude Code

The manual systemd service was missing restartIfChanged=false and
stopIfChanged=false, so nixos-rebuild would stop the agent mid-switch,
dropping the incus exec connection permanently. The NixOS module handles
this correctly, plus includes udev rules and 9p mount setup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ethannortharc ethannortharc merged commit 2e85d7c into main Mar 11, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant