Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: gate reboot decisions on @rebootable_seed_types module attribute

Replace hardcoded "nixos" checks in maybe_reboot/3 and reboot_reason/3
with a @rebootable_seed_types module attribute, allowing reboot logic
to be skipped entirely for non-rebootable seed types.

sow-128

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+7 -2
+7 -2
apps/garden/lib/garden/deployer.ex
··· 11 11 alias SowerClient.Orchestration.SeedDeploymentStatus 12 12 alias SowerClient.Orchestration.Subscription 13 13 14 + @rebootable_seed_types ["nixos"] 15 + 14 16 def run(%Deployment{} = deployment) do 15 17 run_with_opts(deployment, upgrade_opts: [], reboot_opts: []) 16 18 end ··· 249 251 Application.get_env(:garden, :enable_activation, true) 250 252 end) 251 253 252 - if Enum.any?(deployment.seed_deployments, &(get_in(&1.seed.seed_type) == "nixos")) do 254 + if Enum.any?( 255 + deployment.seed_deployments, 256 + &(get_in(&1.seed.seed_type) in @rebootable_seed_types) 257 + ) do 253 258 case reboot_reason_fun.(deployment.seed_deployments) do 254 259 nil -> 255 260 write_reboot_decision(deployment, opts, "no reboot required") ··· 330 335 ) do 331 336 subscriptions = 332 337 seed_deployments 333 - |> Enum.filter(&(get_in(&1.seed.seed_type) == "nixos")) 338 + |> Enum.filter(&(get_in(&1.seed.seed_type) in @rebootable_seed_types)) 334 339 |> Enum.map(fn %SeedDeployment{subscription_sid: subscription_sid} -> 335 340 find_sub.(subscription_sid) || %Subscription{} 336 341 end)