Skip to content

NixOS: declare the agent with services.step-agent; document edge releases - #552

Merged
tashian merged 6 commits into
mainfrom
carl/eff-696-update-install-docs-showing-how-to-install-an-edge-release
Sep 16, 2026
Merged

tashian merged 6 commits into
mainfrom
carl/eff-696-update-install-docs-showing-how-to-install-an-edge-release

Conversation

@tashian

@tashian tashian commented Sep 3, 2026

Copy link
Copy Markdown
Member

Fixes EFF-696.
Refs EFF-698: the stable-install rewrite is that issue's scope; it closes when the docs import the module from nixpkgs.

Rewrites the NixOS install section of the Smallstep Agent page and adds edge-release instructions. Replaces the smallstep-agent.mdx half of #549 (its environment.etc paragraph is subsumed by settings). #549 carries the troubleshooting-agent.mdx wording; agent#1205 shipped in 0.69.3, so this PR no longer touches that file.

What changed

  • Install is one services.step-agent block. Import the module, set enable = true, and declare team and fingerprint in settings. nixos-rebuild switch installs the package, starts the agent, and the device enrolls on first start once it has been added via the API. The interactive step-agent register step is now the alternative for empty settings, not the default.
  • Edge releases subsection: point services.step-agent.package at an overrideAttrs of pkgs.step-agent with the edge tarball URL on packages.smallstep.com and the sha256_sri hash from the release manifest.
  • Names the error a TPM-less host hits and updates the uninstall step.

The services.step-agent module with enable/settings ships from files.smallstep.com/step-agent.nix (identical to extra/step-agent.nix at the agent v0.69.3 tag) and has the same option surface as the module proposed upstream in NixOS/nixpkgs#555971, so the imports line is the only thing that changes once that lands.

The --skip-config note exists because register silently drops a failed config write; that is filed as OFF-21.

Verified

Followed the new section on a nixos-unstable aarch64 VM: install, all units enabled, agent.yaml rendered from settings, step-agent version output as shown, and the edge override switching the running agent to 0.69.2. The edge snippet now shows 0.69.3, the stable release nixpkgs does not have yet; its hash was recomputed from the downloaded step-agent_0.69.3_linux_amd64.tar.gz and matches the manifest's sha256_sri.

The module change has shipped to files.smallstep.com, so step 3's enable/settings options exist for readers now.

🤖 Generated with Claude Code

…ases

Rewrite the NixOS install section around one services.step-agent block:
import the module, enable it, and declare team and fingerprint in
settings. The rebuild installs the package, starts the agent, and the
device enrolls on first start once it has been added via the API, so
the interactive register step goes away for fleets. Interactive
registration stays as the alternative for empty settings.

Add an "Edge releases" subsection: point services.step-agent.package at
an overrideAttrs of pkgs.step-agent with the edge tarball URL on
packages.smallstep.com and the hex sha256 from the release manifest,
which Nix accepts as-is.

Name the error a TPM-less host hits, update the uninstall step, and
note that on NixOS the unit's gate is ConditionPathExists=.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@tashian
tashian requested a review from a team as a code owner September 3, 2026 00:02
With settings declared, agent.yaml is a store symlink, so document the
--skip-config form of register, which registers the device without
attempting to rewrite the declared file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread platform/smallstep-agent.mdx Outdated
Comment thread platform/smallstep-agent.mdx Outdated
Comment thread platform/smallstep-agent.mdx Outdated
tashian and others added 3 commits September 3, 2026 11:06
"Everything it writes lives in /var/lib/step-agent" was too broad: the
sockets go to /run/step-agent and `step-agent register` writes agent.yaml
into /etc/step-agent. Say which directory each concern maps to instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUdbhFjn3CCcyMAm8v33e6
The manifests on packages.smallstep.com now carry sha256_sri, so the
snippet uses fetchurl's hash attribute with that value. Nix reports
mismatches in SRI form, so a reader who pasted the hex form could not
compare the two by eye.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUdbhFjn3CCcyMAm8v33e6
Review pointed out that "settings is written to agent.yaml" reads as if the
option writes the file in place. The module renders it into the store and
links it at /etc/step-agent/agent.yaml so the daemon and the CLI find one
file; say that.

The edge snippet now shows 0.69.3, which is on the stable channel today but
not yet in nixpkgs (0.69.2), so it is the case the section describes. Hash
recomputed from the downloaded tarball and matches the manifest's
sha256_sri.

The troubleshooting-agent.mdx addition moves out of this PR: #549 carries
the ConditionPathExists= wording now that agent#1205 shipped in 0.69.3.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
tashian added a commit that referenced this pull request Sep 15, 2026
Review on this PR asked for services.step-agent.settings rather than a
hand-written environment.etc entry, and #552 rewrites the install section
around exactly that. This PR keeps only the troubleshooting wording, which
is now right for every platform: smallstep/agent#1205 shipped in 0.69.3,
so current deb/rpm units report ConditionPathExists= too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@tashian
tashian requested a review from Srylax September 15, 2026 22:21
@tashian
tashian enabled auto-merge September 15, 2026 22:28
@tashian
tashian merged commit d3f85be into main Sep 16, 2026
4 checks passed
@tashian
tashian deleted the carl/eff-696-update-install-docs-showing-how-to-install-an-edge-release branch September 16, 2026 00:01
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.

3 participants